Commit graph

204 commits

Author SHA1 Message Date
Tom Auger
bbef20d345 fix: live reload port fallback if port is used (#899)
* Move start reload server into separate module

* Find an unused port when starting the live reload server

* Move findUnusedPort into module

* Add tests for findUnusedPort module

* Refactor findUnusedPort

* Move starting of servers into separate module and add tests

* Remove unused constants.js

* Zap extra line breaks

* Add tests for liveReloadServer

* Rename serverController to start

* Move start into lib/server

* Add portfinder package

* Replace findUnusedPort with portfinder

* nits
2018-09-13 02:03:52 +08:00
Fienny Angelina
f2dceffc09 Fix nav to take full width in the docs page (#935)
* Fix nav to take full width in the docs page

Fix #911

* Remove using important in css

* Make Getting started flushed together with icon
2018-09-09 18:00:47 +08:00
endiliey
391a8b5500 refactor: re-implement idx (safe getter) & add test 2018-09-06 00:24:26 +08:00
Hilu luke
969399c6c5 Enable passing attributes to scripts and links (#937) 2018-09-03 15:46:55 -07:00
Tirth Bodawala
2cbfeffd81 Add support for Web App Manifest in siteConfig (#934)
* Add support for Web App Manifest in siteConfig

* Update api-site-config.md

* Update api-site-config.md
2018-09-02 10:25:15 -07:00
endiliey
f1daddb5f9 fix: headernav linking to custom page should check if translation is enabled 2018-09-02 17:11:34 +08:00
Jaril Valenciano
e613725a25 Fix button wrapping behavior on mobile (#921)
* fixed button wrapping behavior

previous+next buttons with long text now stack properly on smaller screens

* truncates function/component names of prev/next buttons

Function/component names are truncated, while regular titles are wrapped

* removed unused styles

* fixed using idx (safe getter) for previous/next titles

passed through prettier and all tests pass
2018-09-01 22:45:32 -07:00
Endilie Yacop Sucipto
88904ab37b
fix: headerNav should link to 'blog/', not 'blog' for consistency (#931)
fix: headerNav should link to 'blog/', not 'blog' for consistency
2018-08-30 19:40:53 +08:00
Shubham Bansal
1a572757f1 feat: last updated time in docs (#913)
* Adding last updated time for docs

* Making file path general and other suggested changes

* Checking if time returned is null due to absence of git or some other issue

* Adding option to enable/disable update time feature and test-doc

* Adding simple unit tests for getGitUpdateTime()

* nits & rewrote failing test

* consistent test naming

* Adding optional updateEnableTime in documentation

* package-lock & yarn.lock
2018-08-29 21:15:18 +08:00
Laxman
cfabaedc99 Fix: conflicting strings issue in translations (#917)
* 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
2018-08-29 00:04:02 +08:00
Endilie Yacop Sucipto
d18b09954b Fix: transformation of url to cleanUrl / pretty url (#923)
* fix: pretty url should only remove html extension

* cleanUrl of '/index.html' should be '/'
2018-08-27 21:09:50 -07:00
Miralem Drek
890054802d Fix console error when onPageNav !== 'separate' (#909) 2018-08-21 10:00:04 -07:00
Yangshun Tay
d2b30dc3ed Revert "Add ability to specify sub categories in sidebar.json (#891)"
This reverts commit 16087b4428.
2018-08-06 18:58:54 -07:00
Will Brock
16087b4428 Add ability to specify sub categories in sidebar.json (#891) 2018-08-06 18:58:48 -07:00
Endilie Yacop Sucipto
18158d6abc
fix: truncate blogpost properly with truncate-html (#880)
* fix: truncate blogpost properly with truncate-html

* revert test file change

* chore: truncate blogpost for feed changelog
2018-08-02 15:16:26 +08:00
Endilie Yacop Sucipto
a6db22b6ff
support 'text' language for no syntax highlighting (#875) 2018-07-28 00:55:27 +07:00
Drew Ballance
0c09cc01cb Correct Prism CSS class for code blocks (#870)
* Correct Prism CSS class for code blocks

* remove prism css theme that conflicts hljs theme
2018-07-25 13:00:17 +07:00
Endilie Yacop Sucipto
defcbcc8ee Refactor + add more tests (Part 1) (#847)
* Refactor mdToHtml out

* Refactor routing + move it to server instead of core

* Refactor & Add more tests for server utils

* Refactor isSeparateCss function from server & generate

* Refactor insertTableOfContents from server & generate + add tests

* undo small nits
2018-07-13 11:31:37 -07:00
Yangshun Tay
a7a214fb3a ESLintify Part 3 (#846)
* ESLintify Part 3

* ESLintify Part 3

* ESLintify Part 3
2018-07-11 18:21:31 +08:00
Yangshun Tay
5ac2cee658
ESLintify Part 2 (#841)
* ESLintify Part 2

* Fix

* Fix tests

* Fix tests

* Fix tests
2018-07-10 21:53:08 -07:00
Endilie Yacop Sucipto
8cd4b4fca6 Fix wrong CSS language prefix for fenced blocks (#842) 2018-07-08 20:17:58 -07:00
Yangshun Tay
e8e3f42685
ESLintify Part 1 (#837)
* ESLint-ify

* Allow empty try/catch

* Escape regexp
2018-07-08 09:13:18 -07:00
Yangshun Tay
128dbfca0a Tidy up ESLint usage (#836)
* Use Airbnb ESLint

* Turn off rules

* Add back

* add website to eslint precommit

* Add back

* remove useless escape
2018-07-07 15:25:14 +07:00
Endilie Yacop Sucipto
3566483aa5 Fix wrong sitemap for alternate URL (#828) 2018-07-04 11:13:30 -07:00
Endilie Yacop Sucipto
60852a2b2e Fix missing fblike button in blog (#821)
* fix missing fblike in blog

* add comment

* comment in js instead

* fb-comments too

* comment the right way
2018-07-01 09:42:36 -07:00
Endilie Yacop Sucipto
21dcea2a31
Integrate eslint & precommit to codebase (#815)
* add eslint, precommit & refactor

* fix exit code 127

* modify contributing.md & add package-lock

* use .eslintrc.js
2018-07-01 12:27:31 +08:00
Endilie Yacop Sucipto
e9eef39760
Fix & refactor server routing + add tests (#799)
* Fix bad routing regex for sitemap & feed

* add tests for sitemap & feed

* use next middleware function if file nto found

* add pages routing & test

* refactor + add more test for page routing

* extension-less url routing + test

* refactor out requestFile

* add dot routing + test to handle special case like http://localhost:3000/blog/2018/05/27/1.13.0

* exit properly

* add more test for sitemap

* update nits from my phone
2018-06-29 16:15:34 +08:00
Ng Yik Phang
76870c6a37 Prevent page from scrolling to top when clicking languages button (#802) 2018-06-24 22:10:06 -07:00
Endilie Yacop Sucipto
66b2033546
Fix bad routing regex for docs & blogs (#795)
* fix bad routing regex for docs & blogs

* extract to routing.js & add test

* add more test case

* address code review

* prettier
2018-06-24 14:10:32 +07:00
Endilie Yacop Sucipto
9ff5328c88
fix algolia version to use the correct version info, not 'current' (#797) 2018-06-24 02:01:23 +07:00
Yangshun Tay
1094dbd352
CSS revamp - Improve typography and overall styling (#757)
* Improve CSS code

* Fix blog layout

* Fix

* Refactor onPageNav

* More fixes

* Fix docs nav

* Use alternative hack

* Tweak clearfix
2018-06-19 21:46:15 -07:00
Endilie Yacop Sucipto
0eb6612b58
add language & version meta for algolia docsearch (#787) 2018-06-19 12:30:03 +08:00
Endilie Yacop Sucipto
0f01eace8b
Use absoluteURL instead of relativeURL for next/prev links (#783)
* Remove trailing slash for docs url

* undo remove trailing slash & use absoluteURL for next/prev links

* use baseUrl instead of hardcoded slash
2018-06-17 11:35:05 +08:00
Thai
7bef1b96dc Hide TOC menu when onPageNav is not separate (#768)
* (bug) - Mobile menu when onPageNav is separate

* fixed lint

* fixed lint

* removed whitespace in brackets

* refactored

* refactor

* Prettier
2018-06-15 21:16:58 -07:00
Luis Merino
371fdda4a8 Fix anchors erroring when heading is empty (#772) 2018-06-15 21:04:46 -07:00
Jonathan Ingram
58fba70dea Add config option for setting title of the blog sidebar (#770)
* Allow controlling the title of the blog sidebar

* Update guides-blog.md
2018-06-15 00:08:34 -07:00
skratchdot
8e58d2e903 Adding baseUrl to feed links. (#745) 2018-06-10 10:56:29 -07:00
Endilie Yacop Sucipto
c47af6be4b Enable custom meta description for custom pages (#752) 2018-06-10 09:35:30 -07:00
Endilie Yacop Sucipto
33a0f309ff
Fix HeaderNav linking to versions page to depends on cleanUrl (#748) 2018-06-10 17:56:49 +08:00
Sviatoslav
3ff24c7926 Show onPageNav on mobile devices (#730)
* Draft implementation of ToC (onPageNav) support for mobile devices

* Support onPageNav on tablets

* Improve tablet layout, when no onPageNav

* Add close state for toc icon

* Close onPageNav, when after navigation on mobile devices
2018-06-09 18:48:18 -07:00
Endilie Yacop Sucipto
c8bc00a3a7 Enable using Prism for syntax highlighting (#735)
* Enable user to use prism.js as syntax highlighter

* add package-lock

* if 'usePrism' is true, use prismjs on all languages

* don't get lang by hljs if use prism

* Update api-site-config.md

* Update api-doc-markdown.md

* only load prism css when usePrism is true
2018-06-09 11:38:01 -07:00
Endilie Yacop Sucipto
ff93ba9853 Translation language respect current url (#734) 2018-06-07 08:15:35 -07:00
Endilie Yacop Sucipto
d04b3ca87b Enable sub-directories in docs/ (#705) 2018-06-07 07:41:28 -07:00
Eric Nakagawa
49c27b733b Adds right-sidebar navigation made available in #475 to Blog Post pages (#682) 2018-06-06 14:20:18 -07:00
Endilie Yacop Sucipto
31f0c27f81 Enable clean / extension-less url (#677) 2018-06-06 13:37:49 -07:00
Lespagnol Rémy
aee255219b Add a scroll to top button siteConfig option (#723) 2018-06-06 12:34:32 -07:00
Endilie Yacop Sucipto
aae106c018 Enable Facebook comments on blog posts (#673)
* Enable comment on blog post

* adjust css

* Tweak
2018-05-19 09:26:57 -07:00
Endilie Yacop Sucipto
f8521c2fe1 Enhance footer with Facebook and Twitter buttons (#666)
* enhance footer with social media buttons

* Update api-site-config.md

* Update Footer.js

* fix minor issue on social-footer

* update facebookAppId description in api-site-config

* rm heading & pad footer social button

* Update api-site-config.md
2018-05-17 21:26:06 -07:00
Amy Lam
f9a09072e3 Add LiveReload (#663) 2018-05-17 16:17:56 -07:00
Agastya Darma
25cf8bb786 Migrate to React 16 (#655)
* migrating to react 16

* Add WarriorJS to Docusaurus users (#656)

* Separate users data from code

* Add WarriorJS to Docusaurus users

* [Feature] Introducing image compression using imagemin (#654)

* Introduce imagemin for compressing images

* Replace original images with the optimized ones

* Add imagemin-svgo to dependencies

* Remove console statement, replace let with const

* Replace let with const

* Add --skip-image-compression

* Run Prettier

* Fix header

* Prettier
2018-05-09 19:58:47 -07:00