5

I am currently evaluating using Docusaurus to generate a static web site. The site itself is not documentation focused, in fact, the site is not even computer or technology related. But as a techie myself, I want a CI and Git-powered publishing strategy for this web site.

Docusaurus uses Markdown for its page content (outside of custom React-based pages). However, when these Markdown pages are built, they are all placed in a top-level folder in the static site called docs. This folder naming doesn't really fit with the web site I want to produce.

There is a configuration setting for customDocsPath but this only changes where the build looks for Markdown files, not the output path in the created site content.

I'm not a React developer, but aside from hacking away at the JavaScript in the build engine to search/replace instances of docs, is there a better way to do this?

cleardemon
  • 365
  • 5
  • 13

3 Answers3

7

In docusaurus 2 changing main docs folder is quite straightforward:

  • rename docs/ to whatever/

  • add following to docusaurus.config.js

    presets: [
    [
      '@docusaurus/preset-classic', // should be already there
      {
        docs: {
          path: 'whatever',
          routeBasePath: 'whatever',
    // ...
    
Cezary Daniel Nowak
  • 1,096
  • 13
  • 21
2

We don't currently support routes other than /docs - yet. There is a pull request that started back in August, but has been recently resurrected again. The PR is being reviewed and updated to allow more customizable routes.

Joel Marcey
  • 1,748
  • 14
  • 13
1

As of Docusaurus 1.6, this is now implemented. The pull request has been merged.

More details about this are found in the site configuration.

Simply add the following to the siteConfig section in siteConfig.js:

const siteConfig = {
  title: 'My Awesome Site',
  docsUrl: '',
  // ...
};
cleardemon
  • 365
  • 5
  • 13