Commit graph

10 commits

Author SHA1 Message Date
Endilie Yacop Sucipto
1f91d19a8c
chore: move to monorepo (#1297)
* chore: move to monorepo

* lint all js file

* simplify circleCI

* fix failing tests

* fix tests due to folder rename

* fix test since v1 website is renamed
2019-03-23 14:21:36 +07:00
Endilie Yacop Sucipto
63f014fce5
fix: relative path markdown linking on versioned docs (#1281) 2019-03-14 16:03:42 +08:00
Marvin Chin
487fd573e5 fix: docs asset links should follow specified docsUrl (#1204) 2019-01-28 09:20:00 -08:00
Joel Marcey
c78a8b4262 fix: do not hardcode siteConfig path (#1150)
* Fix broken build

Do not hardcode path in require to siteConfig

* Just require instead of loadConfig

* Actually use loadConfig

I think the test may be wrong too.

* refactor & nits

* jest mock to fix test

* fix test
2018-12-08 02:09:25 +08:00
tsmrachel
a1e7af7e0e fix: #1114 static files in blog/assets is not working (#1143)
* fix: #1114 static files in `blog/assets` is not working

* lint fix
2018-12-07 23:58:20 +08:00
Endilie Yacop Sucipto
9360739cba
fix: support relative markdown linking (#1138)
* fix: relative markdown reference linking

* prioritize relative linking resolve
2018-12-04 12:26:43 +08:00
Dom Corvasce
61078e38a9 feat: Allow modifying docs url prefix (#914)
* 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
2018-11-28 15:34:16 +08:00
Gianluca Donato
711c15d3e3 feat: warning message when md links are broken (#1116)
feat: show a warning message when md links are broken
2018-11-23 22:43:12 +08:00
Blaine Bublitz
bbf355fdc7 feat: support reference-style linking in documents (#1048)
feat: support reference-style linking in documents
2018-10-27 12:33:44 +08:00
Yangshun Tay
f2927a9fc4
Move Docusaurus 1 files into directory (#966)
* Move Docusaurus 1 into v1 directory

* Update Circle CI commands for new v1 dir

* Remove OC

* Fix tests
2018-09-18 00:58:07 +08:00
Renamed from lib/server/docs.js (Browse further)