Commit graph

191 commits

Author SHA1 Message Date
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
Mikalai Silivonik
6004fef658 fix: strict css/main.css routing (#904) 2018-08-22 16:38:44 +08:00
Yong-Siang Shih
8de57b5c0c fix: add baseUrl to sitemap URLs (#902) 2018-08-12 18:49:45 +07:00
Endilie Yacop Sucipto
8f9f7a5602 Fix correct linking when setting defaultVersionShown to non-latest version (#894) 2018-08-10 23:49:52 -07:00
Tom Auger
3f896c8e18 Fix Jest tests that fail on Windows (#896)
* Fix failing tests

* Suppress build output in build tests
2018-08-10 22:21:52 +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
5fae14a2bf
fix: copy static image as it is if image compression fail (#887)
* fix: fail to copy static image due to image compression on build

* add changelog
2018-08-04 22:40:36 +08: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
afec4bd47c
Refactor(server): share logic between server.js & generate.js (#856)
* nits too many comments

* Refactor to blog.getPages

* Refactor to getPost, fileToUrl, urlToFile

* Refactor redirectcomponent generation for docs

* nits & fix typo

* Refactor to blog.getMetadata

* Add test for getMetadata, fileToSUrl and urlToSource

* use includes() and add 'markup' naming for function
2018-07-24 13:37:52 +07:00
Sashank Thupukari
d3417b3bf2 Add autoprefixing to CSS pipeline (#867)
Add [autoprefixer](https://github.com/postcss/autoprefixer) as a final build step in the CSS pipeline.
2018-07-22 00:05:13 -07:00
Endilie Yacop Sucipto
d42ecb943f
Don't replace static assets linking in fenced code blocks (#864)
* Don't replace any relative links to static assets in a fenced code block

* revert unintended docs change

* improve regex

* remove test file :sob

* stronger regex test for replace assets

* super simplify solution
2018-07-21 20:54:45 +07:00
Endilie Yacop Sucipto
9f718a5097 Refactor + add more tests (Part 2) (#854)
* Refactor doc in server.js & generate.js

* Refactor finding metadata with find() & avoid param reassign

* Refactor replacing markdown link to html + add test

* Minify func to getFile & add test

* use ./ for md link as well

* nits & better test

* better mdToHtmlify

* babel-register on versions & write-translations to transpile ES6 in server/env.js

* better docs test & move out metadata to fixtures

* Update .babelrc
2018-07-16 01:45:23 -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
Yangshun Tay
4267337fb0
Fix CSS tests (#839)
* Fix CSS tests

* Revamp

* -

* fix failing test

* add test for minifyCss with fixtures & snapshot

* remove unintended addition

* simplify the test.css
2018-07-10 10:42:32 -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
Endilie Yacop Sucipto
3566483aa5 Fix wrong sitemap for alternate URL (#828) 2018-07-04 11:13:30 -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
Endilie Yacop Sucipto
418c840ad4
fix wrong sitemap urls (#801) 2018-06-26 13:02:46 +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
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
=^._.^=
62a2c7c1a5 Add option to disable live reload server during development (#766)
* add option to disable live reload server

* change live to watch, fix incorrect argument parsing code

* Update api-commands.md
2018-06-14 23:51:03 -07:00
Joel Marcey
c2ff413650 Configure sitemap depending on whether clean URLs enabled (#765)
* Configure sitemap depending on whether clean URLs enabled

* Run Prettier
2018-06-13 07:00:32 +08:00
Rémi Doreau
a77ae958db Duplicate code in readMetadata.js & versionFallback.js #725 (#726)
* Duplicate code in readMetadata.js & versionFallback.js #725

* Putting back package-lock.json

* Rename lib/server/utilsMetadata.js -> lib/server/metadataUtils.js

* Update splitHeader + extractMetadata

* Update prettier
2018-06-12 12:25:23 +08:00
Endilie Yacop Sucipto
c47af6be4b Enable custom meta description for custom pages (#752) 2018-06-10 09:35:30 -07:00
Endilie Yacop Sucipto
6244bb1aa4 Fix typo in code comment (#747) 2018-06-10 02:17:08 -07:00
Endilie Yacop Sucipto
46661c8f1e Fix Express.js regex for docs & blog (#739) 2018-06-07 09:01:41 -07:00
Endilie Yacop Sucipto
d04b3ca87b Enable sub-directories in docs/ (#705) 2018-06-07 07:41:28 -07:00
Endilie Yacop Sucipto
31f0c27f81 Enable clean / extension-less url (#677) 2018-06-06 13:37:49 -07:00
Endilie Yacop Sucipto
d28b864a59 Don't start server if versions.js is missing but versioning is enabled (#714)
* don't start server if versions.js missing but versioning is enabled

* refactor

* fix nits

* refactor & address review
2018-06-02 23:45:36 -07:00
Endilie Yacop Sucipto
b00e9d14e2 Fix assets not found in Express server (#720) 2018-06-02 11:28:04 -07:00
Endilie Yacop Sucipto
72f4f36939 Enable setting of title for custom pages
* allowing custom title on page component

* Update about-slash.js

* Update help.js

* Update users.js

* Update versions.js
2018-05-30 21:37:38 -07:00
artiebits
b5fd7bae73 Don't watch node_modules dir in dev server mode (#702)
* add a negate pattern for a watcher

* replace hardcoded docs path with getDocsPath()
2018-05-25 22:34:03 -07:00
Endilie Yacop Sucipto
24da6bfba0 Fix typo from #490 (#676)
`'en'` is written as `en`
2018-05-19 07:45:05 -07:00
Amy Lam
f9a09072e3 Add LiveReload (#663) 2018-05-17 16:17:56 -07:00
Ahmad Alfy
ab6bab9f8d [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
2018-05-09 16:59:36 -07:00
Yangshun Tay
1a6f2fc51c Add open in browser functionality (#643) 2018-05-07 09:46:14 -07:00
Yangshun Tay
8d676e6a5a
Extract blog post truncation logic and add tests (#640) 2018-05-06 09:15:18 -07:00
Matthew Francis Brunetti
cf59f72ecd Windows compatibility fix (#583) 2018-05-05 18:29:28 -07:00
Erin Teo
5771549e75 Rename latestVersion to defaultVersion (#639)
* Rename lastVersion to defaultVersion

* Added defaultVersionShown to site-config doc

* Remove defaultVersionShown from siteConfig

* Update api-site-config.md
2018-05-05 17:24:39 -07:00
Joel Marcey
dbc597bfd7 Allow configuring what version is shown by default (#554)
* [RFC] Allow configure what version is shown by default

Seeing if this will work - it won't work if you want to show `master` or `next` by default.
Only named version that would exist in `versioned_docs`.

If this does work and we want to go with it - `latestVersion` in many places seems like a
misnomer. `defaultVersion` would be better or something

* Remove from docusaurus siteconfig
2018-05-04 10:00:46 -07:00
Sviatoslav
9c98142fea Ensure anchor links are unique per document (#574) 2018-05-03 19:36:12 -07:00
Paulus Schoutsen
6c9c7e5de5 Generate sitemap if any blog post or page exists (#610) 2018-04-27 23:09:47 -07:00
Steven Zeck
df6f6df333 Do not ignore 'custom_edit_url' (#604) 2018-04-25 10:40:53 -07:00
Yangshun Tay
d3fd347d21
Regenerate blog metadata on request to blog (#590) 2018-04-22 20:46:16 -07:00
Christopher Chedeau
c400636fb6 Do not ignore the layout header (#587)
#347 added support for warning for unknown fields but didn't take into account `layout` which was added by #128
2018-04-20 09:19:57 -07:00