Comments (4)
Can you share an example site if it possible, thanks
from docusaurus-lunr-search.
Hi! We haven't released the documentation yet. Here's a screenshot of what is rendered. We're generating these documents using docusaurus-plugin-openapi-docs
.
from docusaurus-lunr-search.
Hello , i am getting this error when i am using with docusaurus-plugin-openapi-docs.could you please help me in this
=> Bad Docusaurus plugin value plugins[1].
Example valid plugin config:
{
plugins: [
["@docusaurus/plugin-content-docs",options],
"./myPlugin",
["./myPlugin",{someOption: 42}],
function myPlugin() { },
[function myPlugin() { },options]
docusaurus.config.js
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const { startTransition } = require("react");
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "My Site",
tagline: "Dinosaurs are cool",
url: "https://your-docusaurus-test-site.com",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "facebook", // Usually your GitHub org/user name.
projectName: "docusaurus", // Usually your repo name.
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
docLayoutComponent: "@theme/DocPage",
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
docs: {
sidebar: {
hideable: true,
},
},
navbar: {
title: "My Site",
logo: {
alt: "My Site Logo",
src: "img/logo.svg",
},
items: [
{
type: "doc",
docId: "intro",
position: "left",
label: "Tutorial",
},
{ to: "/blog", label: "Blog", position: "left" },
{
label: "Petstore API",
position: "left",
to: "/docs/category/petstore-api",
},
{
href: "https://github.com/facebook/docusaurus",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Tutorial",
to: "/docs/intro",
},
],
},
{
title: "Community",
items: [
{
label: "Stack Overflow",
href: "https://stackoverflow.com/questions/tagged/docusaurus",
},
{
label: "Discord",
href: "https://discordapp.com/invite/docusaurus",
},
{
label: "Twitter",
href: "https://twitter.com/docusaurus",
},
],
},
{
title: "More",
items: [
{
label: "Blog",
to: "/blog",
},
{
label: "GitHub",
href: "https://github.com/facebook/docusaurus",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["ruby", "csharp", "php"],
},
}),
plugins: [
[require.resolve("docusaurus-lunr-search")],
[
{
id: "openapi",
docsPluginId: "classic",
config: {
petstore: {
specPath: "examples/petstore.yaml",
outputDir: "docs/petstore",
downloadUrl:
"https://raw.githubusercontent.com/PaloAltoNetworks/docusaurus-template-openapi-docs/main/examples/petstore.yaml",
sidebarOptions: {
groupPathsBy: "tag",
categoryLinkSource: "tag",
},
},
},
},
],
],
themes: ["docusaurus-theme-openapi-docs"],
};
module.exports = config;
from docusaurus-lunr-search.
Hi @gauravverma029 remove the square brackets around require.resolve("docusaurus-lunr-search")
, give it like this,
plugins: [
require.resolve("docusaurus-lunr-search"),
[
{
id: "openapi",
docsPluginId: "classic",
.....
from docusaurus-lunr-search.
Related Issues (20)
- 'removeDefaultStemmer' not work
- Feature Request: "Federated search" - Indexing and search across multiple Docusaurus builds HOT 1
- bug in html striping
- [issue]: lunr-search doesn't pickup on heading elements that are non-direct children of '.markdown' HOT 3
- [Feature Request] Highlight matched line after search HOT 2
- [Feature request] filters
- Documents aren't indexed when root is swizzled to add an authentication HOT 4
- Provide a configuration to specify baseUrl or path to generated Search/Lunr JSON files HOT 3
- Support docusaurus 3 HOT 1
- How do I import this search component to use on a custom index/home page? HOT 1
- Error: Can't resolve 'lunr' with yarn
- Support for Docusaurus v3 HOT 1
- Can you expose a prop for the plugin config to set the placeholder text? HOT 1
- excludeRoutes has no impact on index HOT 3
- Snippets mdx no indexed HOT 1
- Indexing site with authentication HOT 2
- Couldn't search docs files of category type HOT 1
- Scroll doesn't appear in search list
- Plugin always shows Loading... and can not used HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docusaurus-lunr-search.