Commit graph

59 commits

Author SHA1 Message Date
Yangshun Tay
d89401b47e feat: change landing page hero (#1290)
* docs: add v2 roadmap to landing page

* feat: change landing page hero

* fix: remove CSS test as it doesn't account for autoprefixing
2019-03-20 16:54:42 +07:00
Alex Krolick
f15ba1b2ac fix(codetabs): fix key warning (#1284)
- closes #1255
2019-03-17 21:53:58 -07:00
Endilie Yacop Sucipto
63f014fce5
fix: relative path markdown linking on versioned docs (#1281) 2019-03-14 16:03:42 +08:00
Endilie Yacop Sucipto
c73da00252 fix: wrong sidebar_label and title on versioned_docs (#1265)
* fix: wrong sidebar_label and title on versioned_docs

* nits
2019-03-06 10:41:05 -08:00
Fienny Angelina
a1d36be61c fix: make referenced links work with code block tabs (#1249)
* Fix bug Code block tabs broke the referenced links

- The reason is that the previous Codeblock implementation separates
the tabs, the markdown before tabs, and the markdown after tabs into
separate Remarkable component, thus they don't share information
regarding the reference link
- To solve this, change the Doc implementation so that one Doc
have only one Remarkable component by transforming the codeblock
into html string and add it as part of the markdown, letting the
Remarkable take care of the html string
- However, this approach made us need to ensure that there is no
newline in the codetab, otherwise, the formatting inside the
code will be broken. Thus, I replace every newline inside the
code tag with a br tag

Fix #1215

* Fix prettier
2019-02-26 08:56:30 -08:00
Jeff Wen
376dd2b018 fix: hovering algolia logo break its background color (#1240)
* fix: css break when hover algolia logo

* Tweak

* Improve

* Remove empty line
2019-02-22 15:56:37 +08:00
Marvin Chin
b2f3642fc6 fix: use clean url for og:url when cleanUrl is true (#1242) 2019-02-21 12:24:31 -08:00
Yangshun Tay
2dae42d0f9 fix: change mainContainer padding to align with sidebars 2019-02-08 12:06:04 +08:00
Yangshun Tay
1fb1a92293
fix: change sidebar chevron icon to use svg (#1211) 2019-01-28 22:03:11 -08:00
Yangshun Tay
a99dbb1976
fix: make search bar taller on widescreen (#1210) 2019-01-28 21:27:21 -08:00
Marvin Chin
487fd573e5 fix: docs asset links should follow specified docsUrl (#1204) 2019-01-28 09:20:00 -08:00
Bartosz Szczeciński
1888e0fb92 fix: horizontal overflow in collapsible sidebar (#1205)
When the sidebar is collapsible, a horizontal scrollbar can be seen, e.g.:

https://docusaurus.io/docs/en/installation - https://i.imgur.com/IkrkLrp.png

This is caused by the arrow being rendered outside of the sidebar box.
2019-01-28 09:18:54 -08:00
Joel Marcey
cbcbf5a8c2
Add copyright header to codetabs.js 2019-01-25 13:45:11 -08:00
Joel Marcey
fdd5117300
Add copyright header to CodeTabsMarkdownBlock.js 2019-01-25 13:42:47 -08:00
Yangshun Tay
dcd3361413 misc: update docs for new features 2019-01-23 23:20:11 -08:00
Fienny Angelina
5ce85e5b5e feat: code block tab (#1063)
* Try to find a way to recognize the codeblock tabs, its title, and
where it ends
- I try using DOCUSAURUS_CODE_TABS to mark the start
- Use TAB_TITLE to mark the title of the tab
- END_TAB to mark the end of that tab
- END_DOCUSAURUS_CODE_TABS to mark the end of the whole code blocks
then parse using regex and render accordingly

* Added on click hook

* Added example on how to write it, how to use it, how it will look like can be reverted later

* Fix css error

* - Move addEventListener part to lib/static
- Remove comments

* Add documentation

* Remove examples

* Change syntax of the codetabs
2019-01-23 21:48:01 -08:00
Marvin Chin
4ce7ae2c98 fix: wrong padding for single row mobile nav (#1191) 2019-01-23 21:42:16 -08:00
tsmrachel
d5fd15ecbe feat: collapsible categories (#1128)
* feat : #1084 Collapsus - The Collapsible Menu

* updated docs

* fixed prettier

* fix for category not auto-expanding upon navigating to a subcategory under it

* as requested by endiliey. Do not merge this commit.

* Update api-site-config.md

* Update guides-navigation.md

* Update SideNav.js

* Update main.css

* Update SideNav.js

* Delete subcategory1.md

* Delete subcategory2.md

* Update sidebars.json
2019-01-23 14:13:27 -08:00
Simen Bekkhus
f6342731cc fix: add margin-bottom: 0 to blog post author (#1193) 2019-01-22 09:37:11 -08:00
Marvin Chin
4dcd6840c3 fix: missing default value for grid block content objects (#1186) 2019-01-16 00:31:27 -08:00
Zoltan Kochan
e31ecdfd0c fix: pass docusaurus-publish cli args to build command (#1185)
* fix: --skip-image-compression

The --skip-image-compression flag is passed thru to the build command

* prettier
2019-01-15 11:54:17 +08:00
Teimur Gasanov
28700a94a9 fix: gap on mobile devices when scrolling (#1157) 2018-12-17 10:04:30 +08:00
Endilie Yacop Sucipto
f12549424e
fix: edit url should support versioned subdirectories (#1154)
fix: edit url should support versioned subdirectories
2018-12-11 11:22:23 +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
Jake Bolam
c4a9b31984 feat: add custom commit message (#1136)
* feat: add custom commit message

Addresses: #1135

* Update publish-gh-pages.js

* add support to v2 as well

* docs: add them

* docs
2018-12-04 12:26:21 +08:00
Endilie Yacop Sucipto
cb1395ee29
fix: docusaurus-version generates wrong metadata
Fix #1140 

Regression from #1125
2018-12-04 12:21:30 +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
maxaggedon
c6f3f0958d feat: customizable search placeholder (#1126)
* feat: customizable search placeholder

* prettier
2018-11-23 14:27:59 -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
Endilie Yacop Sucipto
1e8361392c fix: docusaurus-version should allow duplicate id in different subfolder (#1125)
* fix: docusaurus-version should not be confused for duplicate ids in different subfolder

* nits

* nits

* remove log
2018-11-22 23:51:18 -08:00
Endilie Yacop Sucipto
579cc61bbf fix: docusaurus-version should work with subcategory (#1124) 2018-11-22 21:15:52 -08:00
maxaggedon
2df14feafd feat: use 'sidebar_label' instead of 'title' in prev/next buttons (#1122)
* feat: use 'sidebar_label' instead of 'title' in prev/next buttons

* docs: update 'sidebar_label' description
2018-11-22 18:36:05 +08:00
Endilie Yacop Sucipto
46404461b8
fix: translated pages missing left TOC (#1119) 2018-11-20 16:36:56 +08:00
Shriram Balaji
91c5e5e444 fix: warn unsupported languages by prismjs (#1107)
* Logged unsupported languages instead of stacktrace error. Added some lang aliases

* Modify language highlight color
2018-11-12 18:39:33 +08:00
Andrew Low
49af2075b5 fix: livereload not working on second try (#1103)
* Fix livereload on second try

* fix lint

* Rename to LIVERELOAD_PORT
2018-11-11 22:36:11 +08:00
Yangshun Tay
8bcb5d3365 chore: revert full-width nav changes 2018-10-31 22:35:41 -07:00
Hugues Tennier
e788dc4122 fix: previous / next page buttons label (#1079) 2018-10-31 09:47:55 +08:00
Endilie Yacop Sucipto
f84332d0a0
feat(v2): webpack prefetch for better UX (#1071)
* feat(v2): webpack prefetch for better UX

* test snapshot update

* nits
2018-10-27 13:48:10 +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
7488de266f chore: add final copyright headers 2018-10-26 18:27:37 -07:00
Yangshun Tay
13b23edd12
chore(v1): add Facebook copyright headers (#1068) 2018-10-25 17:30:38 -07:00
claneo
8663a63e7d fix: path/url joining bug on windows (#1064)
* fix error while using multiple level directory

* fix error while using non-english file name
2018-10-25 14:25:10 +08:00
endiliey
8835ec0d60 test: subdirectory doc file linking 2018-10-24 11:26:38 +08:00
sinodko
06e243a77f fix: render proper HTML instead of raw markdown in og:description(#1054) 2018-10-24 09:07:46 +08:00
Fienny Angelina
8cf9afe4ac feat: add last contributor to each document (#980)
* add contributor list to each document

* handle case where there is no github repo

* Move to v1

* Revert "handle case where there is no github repo"

This reverts commit a76a887901.

* Revert "add contributor list to each document"

This reverts commit c0cc79f995.

* Add last updated by field

* -Include enableUpdateBy in the config
- Rename css class to be more general

* Fix lint

* Refactor :
- s/getGitlastupdated/getGitLastUpdatedTime
- refactor part in getGitLastUpdated[Time|By] that overlaps
- remove getAuthorInformation

* -Modify the display logic
-Refactor the utils, combine lastupdatedtime and lastupdatedby
-Replace the test

* Modify docs based on the display change

* Update docs for url and baseurl

For more clarity and to make relationship more clear

* Update support for Web App Manifest (#1046)

* misc: update nits

* misc: update nits
2018-10-18 00:59:16 -07:00
Tirth Bodawala
4a7e1ea189 Update support for Web App Manifest (#1046) 2018-10-17 10:21:10 -07:00
Yangshun Tay
b577f60d4a
fix: improve last updated time feature (#1036) 2018-10-14 15:05:00 -07:00
Fienny Angelina
a39677c202 fix: exclude file movements for last updated time (#1023)
* Fix last updated time misleading, only show when file content change
or otherwise when it is first created

Fix #1015

* Fix prettier

* - Simplify regex
- Uses shelljs instead of cross-spawn
- Make logic clearer

* Add test when repositories is moved

* Use shell.exec mock

I initially try to mock the whole shelljs. But it returns error
shell.exec is not a function when i try to provide the mockResolvedValue
I think it is because of the inner code of shelljs who run a forEach to
require each of its method which make it a promise. I tried moving the
jest.mock inside beforeAll and also adding babel-dynamic-import but it did
not solve the problem. In the end, I decided to just mock shelljs.exec since
it is the only function used anyway
2018-10-14 14:09:39 -07:00