-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-10885. Add a landing page for each section of the documentation. #92
HDDS-10885. Add a landing page for each section of the documentation. #92
Conversation
Apologies in advance for this monster change 😄 @adoroszlai would you be able to review the CI and dev experience portions of this change (everything outside of the docs directory)? @swagle @umamaheswararao @arp7 can you review the doc content portion of this change (everything inside the docs directory)? As I mentioned in the PR description this part is probably easier to do with the rendered sites instead of GitHub's diff view.
|
* HDDS-9225-website-v2: Bump docusaurus to 3.3.2 (apache#93)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @errose28 for the patch, the parts outside docs/
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit: Can be done as a separate PR. Changing the port so that it does not conflict with Grafana and moving blogs one level up.
diff --git a/compose.yml b/compose.yml
index b039dfa8..46fba14e 100644
--- a/compose.yml
+++ b/compose.yml
@@ -20,7 +20,7 @@ services:
build: .
image: ozone-site
ports:
- - 3000:3000
+ - 3001:3000
volumes:
- .:/ozone-site
# The below option is used to prevent overwriting the node_modules directory in the docker image
diff --git a/docusaurus.config.js b/docusaurus.config.js
index 28028689..97adb6ea 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -142,6 +142,10 @@ const config = {
to: 'faq',
label: 'FAQ',
},
+ {
+ to: 'blogs',
+ label: 'Blogs',
+ },
{
label: 'Community',
items: [
@@ -165,10 +169,6 @@ const config = {
to: 'community/events-and-media',
label: 'Events and Media',
},
- {
- to: 'community/blogs',
- label: 'Blogs',
- },
]
},
{
Thanks @kerneltime. I moved blogs up for better visibility in this PR since there were already some layout changes here. Port change I will do in #98 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @errose28, I checked it locally with docker compose and it looks good to me
Thanks for the reviews everyone |
What changes were proposed in this pull request?
Motivation
Currently the website's documentation sidebar is defined by a
_category_.yml
file in each docs subdirectory. The way we currently have these configured has the following limitations:docs/quick-start
, only to a specific page in the section likedocs/quick-start/installation/docker
.Implementation
My initial pass at this involved trying to implement the above with the existing
_category_.yml
files as described in the docusaurus docs. We could add a title, description, and index of content in that section using the yaml file. This had two major issues though:description
field is rendered as a literal string, not markdown which limits what content can be put there.docs/category
slug regardless of their path in the filesystem.docs/quick-start/installation/docker
, the summary for the quick start installation section would be atdocs/category/installation
instead ofdocs/quick-start/installation
.It seems like docusaurus "categories" are meant to be a something separate from the sidebar index, and it just provides the option to map them there. What I think we are actually want for this use case is what Docusaurus calls index documents. This is a markdown (or mdx) file at the root of each subdirectory that we can fill in with a title and summary just like any other markdown page. We can also automatically generate an index of the pages in this section with the
DocCardList
tag.Docusaurus supports calling these files either
index
orREADME
with either.md
or.mdx
extensions. I went withREADME
because it is automatically displayed when browsing via GitHub like this. I am using the.mdx
extension since each of these pages has aDocCardList
react component embedded in it. CI has been updated to make sure that changes in this area continue to follow this convention.Summary of Changes
This is a large change that can be broken into the following parts:
_category.yml_
files previously used to add titles to doc sections.README.mdx
files for all doc sections._category.yml_
files with a check requiringREADME.mdx
files.The changes to 4 and 5 are mostly contained in CONTRIBUTING.md and the .github directory. These are relatively small and can be reviewed with the standard GitHub diff view.
To review changes to 1-3, it is probably easiest to use the rendered website. Use the staging site as the before, and build and run these changes locally to get the after site. Click through the docs sections to review the changes side by side in different tabs or windows.
What is the link to the Apache Jira?
HDDS-10885
How was this patch tested?
DocCardList
at the end causes this failure.DocCardList
tag without importing it fails at the Docusaurus build stage with no extra changes required.