-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[docs/revamp] proof-of-concept for synchronizing API docs with Docusaurus #23604
Conversation
## Summary & Motivation ## How I Tested These Changes
…nto docs/revamp
…nto docs/revamp
## Summary & Motivation Not sure what happened with these commits, but this is the main file to look at: [docs/docs-next/sidebars.ts](https://github.com/dagster-io/dagster/pull/23582/files#diff-cda6fc4afd87e525f2ba446275301459940eb019c94693247602918fcd4c6fbf) I went for a less wordy approach with the category titles, but we can always change these. ## How I Tested These Changes
❌ Deploy Preview for dagsterapidocs failed.
|
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-k1vh8q2sh-elementl.vercel.app Direct link to changed pages: |
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.
I don't think we should commit the converted docs, this should be part of the build process otherwise we'll end up with merge conflicts down the line.
The sphinx extension looks fairly straightforward, and I bet we can override it as well if we need to in order to enable other components. Could be interesting.
|
||
#### asset_checks | ||
|
||
Alias for field number 7 |
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.
What's this?
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.
Weird! I'm not sure.
e5b6152
to
b3b066b
Compare
Removed the generated files. Note that I had to remove the sidebar link for the time being, as when the files don't exist it throws errors. If we decide to, we could still have it built locally so that vale can run, and then gitignore it. This way there is a tighter feedback loop than build -> ci -> vale fails on generated docs. |
137ed67
to
a1e46b0
Compare
Summary & Motivation
Sphinx supports builders to create outputs in various formats: html, latex, etc. However, a third party extension
sphinx_markdown_builder
is required to generate markdown files for your Python project.This proof-of-concept generates markdown files, and then copies them to the
docs/sphinx
directory of our Docusaurus project. Here is an example of how it is rendered:Note that Docusaurus uses an MDX parser by default, which causes problems with the markdown files output by Sphinx. For example
<
and>
would be interpreted as HTML tags. Docusaurus also supports the CommonMark format and can automatically detect if the file is mdx or md by settingconfig.markdown.format
todetect
(reference).Whether this is an ideal way to synchronize our docs is tbd...
How I Tested These Changes