Skip to content

[WIP] Docusaurus Docs - #6456

Closed
SchrodingersGat wants to merge 9 commits into
inventree:masterfrom
SchrodingersGat:docusaurus-docs
Closed

SchrodingersGat wants to merge 9 commits into
inventree:masterfrom
SchrodingersGat:docusaurus-docs

Conversation

@SchrodingersGat

@SchrodingersGat SchrodingersGat commented Feb 8, 2024 •

Copy link
Copy Markdown
Member

This PR represents a work in progress to update the documentation to a modern platform - specifically docusaurus.io

Major Goals

  • Update docs to a modern framework which is easier to develop in and supports some new features that we want
  • Ensure that the docs and website use the same tooling and are visually consistent - see Experiment : Docusaurus inventree-website#177
  • Framework that is more consistent with the InvenTree development process (react support)

Tech Stack Goals

With docusaurus we can more easily achieve the following running goals:

TODO List

  • Migrate existing documentation
  • Update / transfer "admonitions" (different styling in docusaurus)
  • Change pages from .md to .mdx (only where required for extra features)
  • Configure scripting for making releases
  • Configure generation of (versioned) API documentation (Ref: Generate API docs #6319)
  • Configure generation of (versioned) code documentation
  • Get build preview working with netlify
  • Build and host site
  • Update support for image integration / click-to-zoom etc

@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature documentation labels Feb 8, 2024
@netlify

netlify Bot commented Feb 8, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit f0c23ad
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/65c4c6e1d026d3000870a42b

@matmair

matmair commented Feb 8, 2024 •

Copy link
Copy Markdown
Member

This is an improvement in search of a problem IMO. Using a fast-moving thing like a React for docs will leave us with a lot more maintenance work to just keep it going.

I have a lot of problems with that framework but here are a few important ones:

  • Nowadays you can easily create PDFs or EPUBs from the docs, that is not possible/hard with MDX - I do not see what usesfull functionallity MDX brings for that huge downside
  • Their version support is a joke - duplicating files for each version instead of using git. Instead of fixing the architectural problem they just suggest removing old versions
  • They have a huge list of dependencies leading to a lot of breaking changes. Take a look at their recent major release - I can not remember us dealing with anything the large with mkdocs

We can achive all tech stacks goals with the current doc stack. It is not a lack of tools but time that has prevented it form beeing done and I do not see how this change would improve that, I just see added maintenance burden.

@matmair matmair closed this Feb 8, 2024
@matmair matmair reopened this Feb 8, 2024
@SchrodingersGat

SchrodingersGat commented Feb 8, 2024 •

Copy link
Copy Markdown
Member Author

@matmair you make some good points here. Now that I have a basic framework in place here, and starting to look into what it would take to transfer these docs across, it is a bit daunting!

The PR to change the website was partly an effort to have the docs and the website:

a) Have a similar look and feel
b) Use the same tooling to reduce maintenance burden

Looking into this a bit further, perhaps a smarter approach to achieve these goals would be to use mkdocs-material for the website also.

Visually they have come a long way - their website now looks really good. There are also some options for:

Plus, having versioned docs on readthedocs is a great feature, we don't have to track multiple versions ourselves.


This PR was intended as a gauge of interest from yourself and @wolflu05 - clear that there is none from you ;)

I suggest that we:

  1. Add support for versioned API docs in our existing documentation
  2. Improve support for versioned release notes in our existing docs
  3. Port the website across to a similar mkdocs-material stack
  4. Close out Experiment : Docusaurus inventree-website#177
  5. Close out this PR also

While I really do like the look of docusaurus, it is probably not worth the effort - especially without buy-in from you

@matmair

matmair commented Feb 8, 2024

Copy link
Copy Markdown
Member

I think the new website has the potential to look nice but the stack doe not make sense.

Rant about current/propsed stack

The beauty of the current doc (and to some limited degree website) stack is that it closely follows long-held standards in the python/static website generator standards like GFM, easily portable content and separation between logic, theming and content. That keeps it more or less evergreen. Most of the features in Docusaurus seem to be geared towards fast-moving frontend devs/designers that want to have something "professional" looking up and running in a few hours. You get pretty results in a few minutes but once you look into technical details everything is a naive 80% solution.

Further development suggestions

I agree with 1,2,5 but would like to discuss 3 and 4.
It probably makes sense to discuss the long-term goals of all the components in the (eco)system and lay out what (information, code) goes where, how things should work (tech stack, update cycles) and where we document things like this. I think something akin to a ADR process (full-scope docs by AWS, lighter version) makes sense - Pyhton has PIPs for that for example.

@wolflu05

wolflu05 commented Feb 9, 2024

Copy link
Copy Markdown
Member

I would actually had supported this idea, but if @matmair is not happy if maybe that's not the right direction and and closing this PR is the best option.

But IMO we need to improve the look and feel of the website and the docs (to also align with the new PUI refactor), if we want to gain more users (what @matmair calls, do better marketing). Modern users like modern websites more than old school style sites.

@matmair

matmair commented Feb 10, 2024

Copy link
Copy Markdown
Member

Design and tech stack are different things - trying to solve one with the other is a fools errant.

@wolflu05 The website was created in Feb 2022 with a focus on being accessible, working on every device and not needing unnecessary tech. There has been very little feedback on its design so it stayed like it was proposed in the demo. If the website is keeping a user from using InvenTree they won't like the software in it's current state either.

@SchrodingersGat

Copy link
Copy Markdown
Member Author

Closing this out - targeting API docs in #6463

@SchrodingersGat
SchrodingersGat deleted the docusaurus-docs branch February 12, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation enhancement This is an suggested enhancement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants