Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions doc-build/doc_build/core/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def extract_docs(self, ref: str, version: str):
shutil.copytree(source_markdown_paths, dst_path)

# migrate the sidebar and version files
sidebar_src_path = src_path.joinpath('sidebars.js')
sidebar_dst_path = dst_path.joinpath('sidebars.js')
sidebar_src_path = src_path.joinpath('sidebars.json')
sidebar_dst_path = dst_path.joinpath('sidebars.json')
shutil.copyfile(sidebar_src_path, sidebar_dst_path)

version_src_path = src_path.joinpath('versions.json')
Expand Down Expand Up @@ -102,18 +102,19 @@ def move_to_docusaurus(self, docusaurus_path: str):
shutil.rmtree(dst_path)
shutil.copytree(lang_doc, dst_path)

# move to docusaurus/docs
if version == 'current' and lang_doc == 'en':
dst_path = docusaurus_path.joinpath('docs')
shutil.copytree(lang_doc, dst_path)
# move sidebar category translation
src_path = dst_path.joinpath('sidebar_category_translation.json')
print(src_path)
dst_path = docusaurus_path.joinpath(f'i18n/{lang}/docusaurus-plugin-content-docs/{version}.json')
shutil.move(src_path, dst_path)

# handle version and sidebars
# move sidebar
if version == 'current':
dst_path = docusaurus_path.joinpath('sidebars.js')
dst_path = docusaurus_path.joinpath('sidebars.json')
else:
dst_path = docusaurus_path.joinpath(f'versioned_sidebars/version-{version}-sidebars.js')
src_path = versioned_doc.joinpath('sidebars.js')
dst_path = docusaurus_path.joinpath(f'versioned_sidebars/{version}-sidebars.json')
src_path = versioned_doc.joinpath('sidebars.json')
shutil.copyfile(src_path, dst_path)

# move versions.js
Expand All @@ -122,10 +123,3 @@ def move_to_docusaurus(self, docusaurus_path: str):
dst_path = docusaurus_path.joinpath('versions.json')
shutil.copyfile(src_path, dst_path)








2 changes: 0 additions & 2 deletions docusaurus/.env

This file was deleted.

11 changes: 0 additions & 11 deletions docusaurus/.eslintignore

This file was deleted.

32 changes: 0 additions & 32 deletions docusaurus/.eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions docusaurus/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ yarn-error.log*
# files only added during build
i18n/zh-Hans/docusaurus-plugin-content-docs
i18n/en/docusaurus-plugin-content-docs
sidebars.js
sidebars.json
versions.json
versioned_sidebars/*.js
versioned_sidebars/*.json
21 changes: 0 additions & 21 deletions docusaurus/LICENSE

This file was deleted.

12 changes: 12 additions & 0 deletions docusaurus/blog/2019-05-28-first-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
slug: first-blog-post
title: First Blog Post
authors:
name: Gao Wei
title: Docusaurus Core Team
url: https://github.com/wgao19
image_url: https://github.com/wgao19.png
tags: [hola, docusaurus]
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
11 changes: 0 additions & 11 deletions docusaurus/blog/2019-05-30-welcome.md

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docusaurus/blog/2021-08-26-welcome/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
slug: welcome
title: Welcome
authors: [slorber, yangshun]
tags: [facebook, hello, docusaurus]
---

[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).

Simply add Markdown files (or folders) to the `blog` directory.

Regular blog authors can be added to `authors.yml`.

The blog post date can be extracted from filenames, such as:

- `2019-05-30-welcome.md`
- `2019-05-30-welcome/index.md`

A blog post folder can be convenient to co-locate blog post images:

![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)

The blog supports tags as well!

**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
17 changes: 17 additions & 0 deletions docusaurus/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
endi:
name: Endilie Yacop Sucipto
title: Maintainer of Docusaurus
url: https://github.com/endiliey
image_url: https://github.com/endiliey.png

yangshun:
name: Yangshun Tay
title: Front End Engineer @ Facebook
url: https://github.com/yangshun
image_url: https://github.com/yangshun.png

slorber:
name: Sébastien Lorber
title: Docusaurus maintainer
url: https://sebastienlorber.com
image_url: https://github.com/slorber.png
80 changes: 0 additions & 80 deletions docusaurus/build_sidebar.py

This file was deleted.

Loading