Skip to content

Add ability to use a custom /docs location without Swizzle #3

Description

@ilyakam

In my case, I'm hosting on docs.example.com without the /docs path since it's already on a docs subdomain.

To make this plugin work, I had to make the following changes:

  1. Remove the following lines from theme/Root.js:

// Only inject on docs pages
if (!pathname.startsWith('/docs/')) return;

  1. Remove the following lines fromcomponents/MarkdownActionsDropdown/index.js:

    1. // Only show on docs pages (not blog, homepage, etc.)
      const isDocsPage = currentPath.startsWith('/docs/');
    2. if (!isDocsPage) {
      return null;
      }

It would be great if we could configure this plugin using something like docsPath that's set as '/docs/' by default.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions