[Suggestion] - Mkdocs Material as the base for documentation #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you everyone for the great project. Apologies if this PR looks big but in fact is just the initial setup. Let me explain what is this and how it does work.
I'm an opensource contributor and the creator of Esmerald framework. I absolutely love your project and I thought I could help you with some PR and contribute to the growth and health of the codebase (if allowed, of course).
n the last few years, Mkdocs Material became almost a must have for documentation of these type of projects. I know a lot of people also prefer
sphinx
which is very mature and amazing as well, I just findmkdocs-material
easier to setup.Besides Esmerald and some other opensource projects I have built, there are a lot of known projects also using this package for their documentation, for instance, Pydantic, FastAPI, Mkdocstrings and list goes on and on.
I though I could initially suggest for this PR a move to this tool and from there it would be a lot easier to grow and maintain the documentation.
I had the pleasure of talking with one of your team members about this and I thought it would be nice to suggest and see how it goes. Mkdocs Material.
Deploying it it is extremely easy and even maintaining a consistent API Documentation won't be so hard since Python has some defaults that can help you with that to automatically generate those for you. Example of an automatic generated API Documentation would be like this one.
How to test this
I added some extra
make commands
to make it easier for everyone who wants to contribute, to be able to do it easily like running documentation locally, installing requirements without headaches...or
Will make sure it will install all the requirements in your local machine (including for docs).
Will start the documentation locally and by default serving on
https://localhost:8000
.How to add documentation with mkdocs-material
Well, as you can see from the PR, if you want to add a new file, for example a page called
filters
, you only need to do this:docs/
create a file calledfilters.md
.filters.md
tomkdocs.yml
under thenav:
section and that's it!Of course if you want to create documentation sections, the docs of mkdocs explain well but it would be like (inside mkdocs.yml):
What is this
scripts
folderAs per README, it follows a practice "Scripts to Rule Them All".
How to deploy
I could see your docs are published using github actions, so it is already 99% done and mkdocs material actually gives you a clear example how to do it quicky.
Something around this line
- run: mkdocs gh-deploy --force
.