Closed sparkiegeek closed 1 year ago
@sparkiegeek could you provide us with the latest version of the markdown output from step 2, so that we could work on creating a markdown version of the API docs page?
@nottrobin any progress here?
Afraid not. I think this should be scheduled in by the Maas squad - @lilyvidenova?
We thought this would be something you guys did @nottrobin? @cristinadresch could you help here?
I'm very happy to help, but I have so far failed to just get it done in my abundance of spare time, so I think it needs official scheduling.
@cristinadresch Could you let us know where to plan this.
@Caleb-Ellis assigning you here, @nottrobin will be available to help
Just FYI, this should follow the model of the Ubuntu kubernetes docs - as in, a markdown file that lives directly in the site repo, that the site will parse at serve-time:
The content is ported in this branch https://github.com/canonical-web-and-design/maas.io/pull/497 but not closing this issue as it was manual.
The steps to replicate the port:
make docs
in MAAS core###############################
in the rst filepandoc maas-api.rst --from rst --to html5 -s -o maas-api.html
<summary>``
to <summary><code>
s/``</summary>/</code></summary>/
templates/docs/api.html
in maas.io code base.cat ../maas/api-docs.rst | sed -e'/###############################/d' | pandoc - --from rst --to html5 -s -o- | \
sed -e's@^ <summary>``@<summary><code>@;s@``</summary>@</code></summary>@' > templates/docs/maas-api.html
Ash nazg durbatulûk, ash nazg gimbatul, ash nazg thrakatulûk, agh burzum-ishi krimpatul.
cat ../maas/api-docs.rst | pandoc - --from rst --to html5 -s --shift-heading-level-by=1 -o templates/docs/maas-api.html
Then manually compare (e.g. meld templates/docs/{,maas-}api.html
) next steps would be something like extracting <body />
and put it in <div class="l-docs-row row">
Summary
As of https://github.com/canonical-web-and-design/maas.io/commit/d0066a894a18b831dc430bc880f3fa198e6b1302 API docs for MAAS are published from a HTML document in this repo.
The source material for those docs is docstrings in the MAAS codebase. A short description of the publishing pipeline is in https://paste.ubuntu.com/p/HphN7txwQb/
As per discussions, it would be easier if the MAAS team could go from step 2. to proposing Markdown changed to this repo and skipping out the mythical step 4.
Process
Attempt to update API docs from a MAAS version.
Current and expected result
Currently stuck at step 4 of https://paste.ubuntu.com/p/HphN7txwQb/.
Expected to be able to easily update docs