Commit graph

32 commits

Author SHA1 Message Date
Sébastien Lorber
f8a670966e
feat(core): async docusaurus.config.js creator function (#6165) 2021-12-22 17:03:01 +01:00
Joshua Chen
9078fd9fb2
docs: refactor & refine lifecycle API docs (#5918)
* docs: refactor & refine lifecycle API docs

* Fix links

* More writeup

* Rewording

* Rename path

* Use README

* Fix links

* Add redirects

* Do the same for latest version as well

* Move folder

* Fix broken link
2021-12-21 14:54:04 +08:00
Oliver Ullman
1366c31201
feat(core): allow sourcing from multiple static directories (#4095)
* [WIP] Implementaion of multiple directory static sourcing

* Move default to validation

* Update test

* Refactor

* Port to MDX loader

* Fix

* Move dogfooding assets

* Doc writeup

* Restore assets

* Support absolute paths

* Dogfood absolute path

* Fix

* More tests

* Fix snapshots

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-11-18 22:26:26 +08:00
Joshua Chen
4478dd9659
docs: make API sidebar partially autogenerated (#5917)
* docs: make API sidebar autogenerated

* fix paths
2021-11-10 14:08:50 +08:00
Devtato
41ef9daafd
feat(theme-classic): allow specifying width/height in logo (#5770)
* feat: changed the logo properties to allow width/height specification

* fixup! feat: changed the logo properties to allow width/height specification

* fixup! feat: changed the logo properties to allow width/height specification

* Rework: add fields to logo object

* Fix

* More fixes

* Wrong width!

* No need for optional chaining

* Doc writeup

Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
2021-11-01 18:09:30 +08:00
William Poetra Yoga
ca9bd244aa
feat: allow user to specify deploymentBranch property in docusaurus.config.js (#5841)
* feat: allow user to specify deploymentBranch property in docusaurus.config.js

* docs: remove extra backtick

* docs: fix broken code block
2021-10-31 12:29:22 +08:00
琚致远
1522c21a79
docs: update ssrTemplate (#5774)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-10-27 11:41:27 +02:00
Sébastien Lorber
92002b6bd3
docs: rename docusaurus.config.js route + redirects cleanup (#5755) 2021-10-21 15:16:54 +02:00
Joshua Chen
3f1f8255a2
chore: upgrade Prettier + regenerate lock file (#5611)
* Bump deps

* Run prettier

* Format docs

* Minor refactor

* Collapse objects

* Fix type

* Update lock file
2021-09-30 12:54:17 +02:00
Sébastien Lorber
138b4c9975
fix(v2): allow undefined favicon (#5054)
* fix(v2): allow undefined favicon

* fix snapshots
2021-06-24 18:50:28 +02:00
Sébastien Lorber
df8a900f9c
feat(v2): add trailingSlash config option (#4908)
* POC: add trailingSlash option

* integrate the preferFoldersOutput option of fork @slorber/static-site-generator-webpack-plugin

* Fix broken links when using trailing slash => using md links is more reliable

* fix TS issue

* minor polish

* fix doc page being sensitive to trailing slashes

* Add tests for applyTrailingSlash

* rename test files

* extract and test applyRouteTrailingSlash

* update snapshot

* add trailing slash config to serve command

* fix getSidebar() => still sensitive to trailing slash setting

* never apply trailing slash to an anchor link

* Add documentation for trailingSlash setting
2021-06-09 19:59:39 +02:00
Alexey Pyltsyn
55e9bd8ac9
refactor(v2): remove type attribute from link and script tags (#4907)
* refactor(v2): remove type attribute from link and script tags

* minor TS fix

* stylesheets.type => optional

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-09 14:55:47 +02:00
Sébastien Lorber
57806798c5
fix(v2): fix contentTitle issues when markdown h1 title contains code blocks (#4882)
* attempt to fix contentTitle issues when markdown h1 title contains inline code blocks

* mention hide_title frontmatter only prevents frontmatter.title from being added in the dom (not a markdown # title in content)

* alwayss insert MainHeading under the div.markdown container for consistency

* ensure MainHeading has no useless id

* revert https://github.com/facebook/docusaurus/pull/4859 as it's now useless: docMeta.title contains the text/frontmatter title in priority over the contentTitle

* fix docs test after revert

* improve markdownParser and fix tests

* fix docs tests

* markdownParser: restore option to remove contentTitle (mostly for blog plugin)

* use removeContentTitle for blog
2021-06-03 17:45:19 +02:00
Tales Porto
e99bb43823
feat(v2): docusaurus deploy: ability to configure port in git url (#4545)
* Creating a way to configure the port used on the guthub deploy.

* Fixing some mistakes

Documenting

Adding githubPort documentation on docusaurus.config.js.

Addind SSH protocol prefix. ssh://

Using the default protocol port instead of define it on the code.

Prettify.

* Fixing some mistakes

Documenting

Adding githubPort documentation on docusaurus.config.js.

Addind SSH protocol prefix. ssh://

Using the default protocol port instead of define it on the code.

Prettify.

* Isolating the logic to generate the url and testing it.

* Changing all the names used on tests to something more unserstandable.

* Prettify

Co-authored-by: Tales Porto <t.andrade-porto@klarna.com>
2021-04-09 18:05:16 +02:00
Sébastien Lorber
78349480af
chore: rename v2.docusaurus.io urls after domain switch + redirect + cleanups (#4490)
* prepare v1-v2 domain switch

* rename v1 changelog as CHANGELOG-1.x.md

* switch v1/v2 changelogs

* Cleanup v2.docusaurus.io urls

* add netlify domain redirect

* remove circleci config

* remove another circle file
2021-03-22 20:57:49 +01:00
Alexey Pyltsyn
291a72fbae
docs(v2): use explicit heading IDs (#4460) 2021-03-19 11:00:41 +01:00
Alexey Pyltsyn
1c7d423e0c
docs(v2): various improvements (#4369)
* docs(v2): various improvements

* Update blog.md
2021-03-09 14:59:32 +01:00
Alexey Pyltsyn
0ac34b75c5
feat(v2): add support for RTL direction (#4140)
* feat(v2): add support for RTL

* Move to i18n config

* Move direction to localeConfigs

* Create RTL styles for Docusaurus styles (via new hook)

* update infima to alpha 19

* fix minor type error

* Fix build

* Cleanup

* polish RTL support

* polish RTL support

* revert english rtl dir

* minor RTL fix

* minor doc updates

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-02-10 10:52:26 +01:00
Sébastien Lorber
a8ee7fd3e8
docs(v2): i18n doc + polish (#4014)
* add some initial i18n doc

* i18n doc progress

* i18n tutorial progress

* i18n tutorial progress

* polish Crowdin docs

* i18n sidebar in guides

* polish crowdin doc

* update Crowdin doc a bit

* fix annoying relative link to global site resource in template (breaks i18n tutorial)

* template: use simpler export for homepage

* add markdown page example

* rename mdx.md to interactiveDoc.mdx

* update bootstrap/facebook templates too

* sync init template package scripts

* add slug frontmatter doc

* improve i18n doc

* complete i18n doc

* temporarily enable the localeDropdown

* doc typo

* improve the i18n doc

* Add Git i18n doc

* add missing "--" for npm run options (unfortunately they don't get stripped by npm2yarn, and are required foor npm)

* improve a bit the Crowdin doc
2021-01-19 17:26:31 +01:00
Sean Campbell
af8dc63202
docs(v2): add hideableSidebar option to config demo (#4009)
* docs: add hideableSidebar option to config demo

* Update docusaurus.config.js.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-01-19 17:17:02 +01:00
Sébastien Lorber
746a19f25b
feat(v2): add baseUrlIssueBanner configuration to disable banner (#3802)
* add baseUrlIssueBanner configuration

* handle review
2020-11-23 20:54:13 +03:00
iAmir
8f2d898f22
feat(v2): onBrokenMarkdownLinks config (#3658)
* refactor(v2): move `reportMessage` from `core/src/server/utils` to `utils` package

* feat(v2): handle broken markdown links by using onBrokenLinks prop from siteconfig

* feat(v2): add a new site config prop called `onBrokenMarkdownLinks`

works like onBrokenLinks, but only for markdown links

* feat(v2): add `onBrokenMarkdownLinks` to API docs

* some changes regarding test issues after adding `onBrokenMarkdownLink`

* Update website/versioned_docs/version-2.0.0-alpha.66/api/docusaurus.config.js.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-10-31 18:04:56 +01:00
Alexey Pyltsyn
bfefc46436
refactor(v2): various fixes (#3587)
* refactor(v2): various fixes

* Test
2020-10-16 10:54:23 +02:00
Hamza Hamidi
e0c644e623
feat(v2): Add themeConfig.noIndex option #3528 (#3573)
* feat(v2): Add themeConfig.noIndex option #3528

* feat(v2): Add themeConfig.noIndex optionthrough ssrTemplate

* feat(v2): Include themeConfig.noIndex in CLI migration v1 to v2

* feat(v2): Remove themeConfig.noIndex from env dev
2020-10-14 11:14:16 +02:00
Sébastien Lorber
5b79f2ebc2
feat(v2): site client modules (#3545)
* site client modules

* Update website/docs/api/docusaurus.config.js.md

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-10-07 14:44:14 +03:00
SaintMalik
6dec70b69f
docs(v2): Fix url bugs in v2 docs (#3534)
* Fix broken link in the documentation

* Fix broken url caused by typo

* Fix broken link caused by typo
2020-10-04 19:46:48 +02:00
Bartosz Kaszubowski
c0d8238c49
feat(v2): add ability to set custom title delimiter in config (#3460)
* feat(v2): add custom title delimiter to the theme classic

* fix validation tests

* remove title delimiter fallback

* move titleDelimiter to main config, update theme-bootstrap

* remove test value from config

* update test snapshot

* Improve docs

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-09-26 00:25:19 +03:00
Méril
77db144378
docs(v2): reference Eta's syntax in ssrTemplate section (#3425) 2020-09-09 15:49:11 +02:00
Méril
3ace60043b
feat(v2): allow users to specify a custom ssr HTML template (#3387)
* feat(v2): allow users to specify a custom ssr HTML template

* docs(v2): add ssrTemplate property to docusaurus.config.js page
2020-09-02 19:29:04 +02:00
Drew Alexander
fdf08e787f
docs(v2): Added switch config docs to theme-classic API (#3194)
* Reduce commented info in API

* Update yarn lock

* Add switch config documentation to theme-classic

* Expand highlighted code block

* Add unicode example to icons

* Punctuation and white space fixes

* Revert changed comment

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

* Remove camel case comment

* Revert api style comment

* Revert "Update yarn lock"

This reverts commit 5b5b3d39a1.

* Update website/docs/theme-classic.md

* Update website/docs/theme-classic.md

* Update website/docs/theme-classic.md

* Update website/docs/theme-classic.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-08-05 18:54:41 +02:00
Sébastien Lorber
48b996773c
chore(v2): prepare v2.0.0.alpha-61 release (#3182)
* alpha 61 release

* doc prettier

* v2.0.0-alpha.61
2020-08-01 15:24:46 +02:00
Teik Jun
300aecb8bc
feat(v2): warn user when there are conflicting routes (#3083)
* feat(v2): add warning for path override

* feat(v2): check all routes recursively

* docs(v2): add docs for conflicting routes

* style(v2): improve comments in code

* refactor(v2): remove unused lifecycle method from docs plugin

* Revert "refactor(v2): remove unused lifecycle method from docs plugin"

This reverts commit 8b2caaa091.

* feat(v2): add option for changing duplicate path behavior

* feat(v2): decouple logging from logic and detect duplicate routes in one pass

* test(v2): fix failing tests

* test(v2): add tests for duplicateRoutes

* test(v2): add test for handleDuplicateRoutes

* style(v2): add else statement

* docs(v2): modify documentation for duplicate routes

* docs(v2): move doc into guides folder

* fix(v2): fix broken links

* docs(v2): move docs for docusaurus config into api folder

* style(v2): add comments

* refactor(v2): extract getFinalRoutes

* refactor(v2): scope getFinalRoutes to docusaurus package

* test(v2): remove obsolete snapshots

* docs(v2): remove some docs

* fix(v2): rerun github actions

* docs(v2): change slug of docs in api folder

* refactor(v2): extract out a reportMessage method

* refactor(v2): extract getAllFinalRoutes

* test(v2): replace snapshots with actual value

* style(v2): remove unnecessary comment and change type

* chore(v2): remove unused dependency

* style(v2): remove unused code

* Update packages/docusaurus/src/server/utils.ts

* Update website/docs/guides/creating-pages.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-07-31 21:14:49 +02:00
Renamed from website/docs/docusaurus.config.js.md (Browse further)