* Allow other routes than /docs in the URL
siteConfig.js has a new mandatory field named *docsRoute* which default
value is 'docs' and that can be customized by the user.
This change will allow users who uses the library to host guides and
tutorials to customize their websites by assign 'docsRoute' values
like 'tutorials' or 'guides'.
Fixes#879
* Make "docsRoute" field optional
* Isolate docsRoute login in getDocsRoute function
* Rename docsRoute to docsUrl
* Run prettier
* Remove old folders
* fix: Restore docusaurus reference link
* fix: Add `docsUrl` param fallback. Refactor multiple function calls
* Fix linting errors
* Update description for docsUrl field
* Reduce redundant calls to getDocsUrl
* Replace a missed use case for `docsUrl` instead of the function call
* Move `getDocsUrl` out from `server/routing.js` to `server/utils.js`
**Why?**
Because `routing.js` is exporting all router RegEx's, and the
`getDocsUrl` suffices more as a util
* WiP: Align leading slashes and fix routing around `docsUrl`
Checklist:
- [x] Added `removeDuplicateLeadingSlashes` util to make sure there is only
one leading slash
- [-] Fix edge cases for routing:
- [x] `docsUrl: ''`
- [ ] `docsUrl: '/'`
- [ ] make it work with languages
- [ ] make it work with versioning
* Make leading slashes canonical cross routing and generated links
This ensures correct routing for customized `baseUrl` and `docsUrl`.
- Changed all routing functions to take `siteConfig` instead of
`siteConfig.baseUrl`
- Updated tests accordingly
* Alternative fallback for `docsUrl`
* rework/ fix implementation
* cleanup
* refactor and add docs for config props
* fix typo
* fix broken url
* Fix conflicting strings issue in translations
* Preserve structure of `customTranslations`
* Use `deepmerge` to merge whole of `localized-strings`
* Simplify and make deep property access on an object safe
* Fix deep property accessor and rename it to idx
Both crowdin and docsearch i18n configs use TW and CN over Hant and Hans. This should reduce some config confusions.
cc @ericnakagawa. Also, apparently you're working on algolia search i18n?
* added a note about needing more than one language to be enabled to allow for a drop down
* Removing debug statements
* Add 'Help Translate' to translatable strings, improves error messages around missing translated strings, calls write-translations on some routes
* Adds sitemap.xml to live server and build. Versioning not supported. -- Also did some file name and module cache cleanups.