Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs-only mode not working

See original GitHub issue

Bug description

If you use docs-only mode the indexer doesn’t index directories but only the entry page.


Use docs-only mode described here


Package Versions

yarn list v1.22.5
├─ @cmfcmf/docusaurus-search-local@0.4.0
├─ @docusaurus/core@2.0.0-alpha.69
├─ @docusaurus/cssnano-preset@2.0.0-alpha.69
├─ @docusaurus/mdx-loader@2.0.0-alpha.69
├─ @docusaurus/plugin-content-blog@2.0.0-alpha.69
├─ @docusaurus/plugin-content-docs@2.0.0-alpha.69
├─ @docusaurus/plugin-content-pages@2.0.0-alpha.69
├─ @docusaurus/plugin-debug@2.0.0-alpha.69
├─ @docusaurus/plugin-google-analytics@2.0.0-alpha.69
├─ @docusaurus/plugin-google-gtag@2.0.0-alpha.69
├─ @docusaurus/plugin-sitemap@2.0.0-alpha.69
├─ @docusaurus/preset-classic@2.0.0-alpha.69
├─ @docusaurus/theme-classic@2.0.0-alpha.69
├─ @docusaurus/theme-common@2.0.0-alpha.69
├─ @docusaurus/theme-search-algolia@2.0.0-alpha.69
├─ @docusaurus/types@2.0.0-alpha.69
├─ @docusaurus/utils-validation@2.0.0-alpha.69
└─ @docusaurus/utils@2.0.0-alpha.69

Node Version


Docusaurus Environment

Are you using a custom theme? No


module.exports = {
    title: 'Title',
    tagline: '',
    url: '',
    baseUrl: '/',
    favicon: 'img/favicon.ico',
    organizationName: 'org',
    projectName: 'docs',
    themeConfig: {
        sidebarCollapsible: false,
        navbar: {
            title: 'Title',
            logo: {
                alt: 'Alt text',
                src: 'img/logo.svg',
            items: [
                    to: '/',
                    activeBasePath: 'docs',
                    label: 'Docs',
                    position: 'left',
        footer: {
            style: 'dark',
            copyright: `Built with Docusaurus.`,
    presets: [
                docs: {
                    routeBasePath: '/',
                    sidebarPath: require.resolve('./sidebars.js'),
                theme: {
                    customCss: require.resolve('./src/css/custom.css'),
    plugins: [
                docsRouteBasePath: '/', // must correspond to the base route path configured for the docs plugin
                indexBlog: false, // whether to index blog pages
                indexDocs: true, // whether to index docs pages
                language: ['en', 'de'], // language of your documentation, see next section
                docsOnlyMode: true,

Additional context

I introduced a new configuration option called docsOnlyMode (see above). It basically skips the URL prefix check in the flatMap function call:

if (indexDocs && docsOnlyMode) {
    return { route, url, type: "docs" };


I don’t know if thats the most elegant solution but for my case it works. I can also open a PR to further discuss this issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

franciscojaramillocommented, Dec 15, 2020

@Techassi Let me know if I can help in any way–very interested in getting this going

Techassicommented, Dec 15, 2020

Sure… I wil open a PR in a few days. Looking forward to your feedback!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docs-only mode doesn't work · Issue #3567 - GitHub
Docs-only mode doesn't work I ran the following command to install Docusaurus 2.0.0-alpha.65: $ npx @docusaurus/init@next init website ...
Read more >
How to Fix Google Docs Offline Not Working - Guiding Tech
Struggling to work with Google Docs when offline? Try these troubleshooting tips and get back to work ASAP.
Read more >
Docs Introduction - Docusaurus
The docs feature provides users with a way to organize Markdown files in a hierarchical format.
Read more >
Displaying the sidebar on the landing page in 'docs-only' mode
The problem is that when you land on the docs homepage, there is no sidebar. The 'Next' button is available at the bottom...
Read more >
docs-only - Issues · / GitLab · GitLab
GitLab is an open source end-to-end software development platform with built-in version control, issue tracking, code review, CI/CD, and more.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found