-
Notifications
You must be signed in to change notification settings - Fork 141
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: setup mkdocs #414
docs: setup mkdocs #414
Conversation
45d9bff
to
0fba707
Compare
Hey hey, So we sync files from repos to the main docs site Pact pythons sync job is here https://github.com/pact-foundation/docs.pact.io/blob/master/scripts/sync/pact_python.rb Its pretty easy to update the format on the site to make a readme split out into different sections, and if this creates html, we can render that on the doc site too. I'm open to any reimagined ideas about the docs, I want to make things easier for devs in their native languages but also want a unified experience for all users so they can see how to do the same Pact thing, across every language in a meaningful way. I like the idea of correct api documentation that is generated from the code, the code is our source of truth, and I like things like rusts docs for a quick google or searching functions, its consistent across that ecosystem. Curious to see what it looks like when you get the deployment sorted, or a preview hooked up |
0fba707
to
d555b56
Compare
d555b56
to
afa1972
Compare
afa1972
to
41756ce
Compare
41756ce
to
b4e06e2
Compare
b4e06e2
to
15a5506
Compare
15a5506
to
d0bd1a7
Compare
d0bd1a7
to
b3420e9
Compare
b3420e9
to
84abad6
Compare
84abad6
to
67f83d7
Compare
The work is finally ready for review, and can be viewed online at: Important Before this PR is merged, the publication step of the Docs GitHub Action must be modified so that it only runs on @YOU54F and @mefellows, I would be keen for your review on the docs before it gets merged as this is a rather substantial change, and I want to make sure there are no unforeseen repercussions. |
MkDocs is a popular tool in the Python ecosystem to generate documentation. It has support for parsing Python docstrings in order to generate API documentation quite easily. Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
The emoji extensions have been incorporated directly into mkdocs-material. Signed-off-by: JP-Ellis <josh@jpellis.me>
The scripts are significantly improved to make them easier to use and maintain. Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
The main README has been completely overhauled: - It is now more closely aligned with Pact JS and Pact Go - It is much shorter, with usage documentation having been moved into `/docs` - Reference to Pact Python `v3` has been added. Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
This is a major write up of docs for V3. Including the following changes: - Adding a timeline to make it clearly visible - Added usage documentation within the modules - Consolidated all `Interaction` classes into one module, and hiding the sub-modules from the docs. Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
Fix typos Authored-By: JosephBJoyce Cherry-Picked-By: JP-Ellis <josh@jpellis.me>
d9c1f08
to
1695527
Compare
Due to the processing that is done on files outside of `docs/`, links to file _inside_ the `docs/` directory do not work. This adds a hook to MkDocs which rewrites these links. Signed-off-by: JP-Ellis <josh@jpellis.me>
1695527
to
02ec225
Compare
Specifically, adding `FORCE_COLOR` to ensure we have coloured output (it is prettier afterall), and making sure `HATCH_VERBOSE` is always enabled in case there's an error. Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
Closes #416 |
📝 Summary
MkDocs is a popular tool in the Python ecosystem to generate documentation. It has support for parsing Python docstrings in order to generate API documentation quite easily.
The docs can be seen live at:
Note that a lot of the 'legacy' codebase will not render correctly. The sections which should be looked at are:
pact.v3
Important
Before this PR is merged, the publication step of the Docs GitHub Action must be modified so that it only runs on
master
.🚨 Breaking Changes🔥 Motivation
Work for this was created during my own development to see the API from an end-users' perspective.
🔨 Test Plan
🔗 Related issues/PRs