docusaurus/packages/docusaurus-theme-classic
Sébastien Lorber db79d462ab
feat(v2): auto-generated sidebars, frontmatter-less sites (#4582)
* POC of autogenerated sidebars

* use combine-promises utility lib

* autogenerated sidebar poc working

* Revert "autogenerated sidebar poc working"

This reverts commit c81da980

* POC of auto-generated sidebars for community docs

* update tests

* add initial test suite for autogenerated sidebars + fix some edge cases

* Improve autogen sidebars: strip more number prefixes in folder breadcrumb + slugs

* fix typo!

* Add tests for partially generated sidebars + fix edge cases + extract sidebar generation code

* Ability to read category metadatas file from a file in the category

* fix tests

* change position of API

* ability to extract number prefix

* stable system to enable position frontmatter

* fix tests for autogen sidebar position

* renamings

* restore community sidebars

* rename frontmatter position -> sidebar_position

* make sidebarItemsGenerator fn configurable

* minor changes

* rename dirPath => dirName

* Make the init template use autogenerated sidebars

* fix options

* fix docusaurus site: remove test docs

* add _category_ file to docs pathsToWatch

* add _category_ file to docs pathsToWatch

* tutorial: use sidebar_position instead of file number prefixes

* Adapt Docusaurus tutorial for autogenerated sidebars

* remove slug: /

* polish the homepage template

* rename _category_ sidebar_position to just "position"

* test for custom sidebarItemsGenerator fn

* fix category metadata + add link to report tutorial issues

* fix absolute path breaking tests

* fix absolute path breaking tests

* Add test for floating number sidebar_position

* add sidebarItemsGenerator unit tests

* add processSidebars unit tests

* Fix init template broken links

* windows test

* increase code translations test timeout

* cleanup mockCategoryMetadataFiles after windows test fixed

* update init template positions

* fix windows tests

* fix comment

* Add autogenerated sidebar items documentation + rewrite the full sidebars page doc

* add useful comment

* fix code block title
2021-04-15 16:20:11 +02:00
..
codeTranslations feat(v2): theme default translations hindi (#4596) 2021-04-12 18:02:56 +02:00
src feat(v2): auto-generated sidebars, frontmatter-less sites (#4582) 2021-04-15 16:20:11 +02:00
babel.config.js feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
package.json refactor(v2): replace react-toggle with own implementation (#4608) 2021-04-15 16:15:07 +02:00
README.md docs(v2) themes (#1645) 2019-07-26 12:00:40 +07:00
tsconfig.json feat(v2): Support swizzling TypeScript components (#2671) 2020-06-25 16:07:30 +02:00
update-code-translations.js fix(v2): i18n fixes (#4466) 2021-03-19 14:23:31 +01:00
update-code-translations.test.js feat(v2): auto-generated sidebars, frontmatter-less sites (#4582) 2021-04-15 16:20:11 +02:00

Docusaurus Theme Classic

The classic theme for Docusaurus.

Installation

Add docusaurus/theme-classic to your package:

npm i @docusaurus/theme-classic
# or
yarn add @docusaurus/theme-classic

Modify your docusaurus.config.js:

module.exports = {
  ...
+ themes: ['@docusaurus/theme-classic'],
  ...
}

Swizzling components

$ npm swizzle @docusaurus/theme-classic [component name]

All components used by this theme can be found here