dataplat/docs

Write HTML to disk

Closed this issue · 16 comments

Is it possible to make a tool to write it to disk instead of using javascript? javascript doesn't index as well and I find it to be less usable than regular static HTML.

thank you

so something that takes the rendered version of the site down as html ?

(also .... why ? internet down? need to search via a different tool ?)

Hey niph. Thanks for the response. This is for our docs repo. So changes would write to my disk, and I would commit to the repo. Then each command would have an html file and google would index it better

ah okay, SEO purposes. Won't be a single page anymore though.

it'll actually be more resemblant to readthedocs, which is obviously better indexed but far less "fast" in browsing. I don't think reinventing the wheel would be a good fit here, mkdocs would be the way, in line with other (albeit surely less massive) ps modules.

@niphlod most doc sites I've hit for readthedocs are fairly smooth in browsing when I've used it. Invoke-IR/PowerForensics uses it here

I've seen michaeltlombardi/mkdocs-psinder project on his demo site. I don't see how that will format well for our module though with the number of commands we have now though.

Do you have any examples of modules (close to our size) that are using the mkdocs?

I'm not aware of any pressure.

There are already modules available that can be used to take our help for each command and generate a markdown file for each one. Are you trying to write that from scratch?

Why not host the POC on this repository as a branch so others can demo it and provide additional feedback?

you're absolutely right. So much that now if you search "procrastinating" in the vocabulary, "niphlod" may pop up as a perfect example. I'm really, deeply sorry.

Thanks for having snapped me out of it.

Just pushed the "multiple_pages" branch.

Instructions:

  • install the MarkdownToHtml module
  • go into the templates\ folder
  • run to_md.ps1

it will create the index (bonus points, word cloud with tags), the opensearch definition and the robots.txt needed to be submitted to google for indexing.
Basically this is all is needed to create single pages out of the json index, and, if you all like it, run it in a gh action whenever the json index is updated to generate all that is needed to have a single html page for each function

hey @wsmelton and @potatoqualitee , I think I got the GH action right: do you think you can spare some time to review it in order to hook it up here ? see https://github.com/niphlod/docs/blob/master/.github/workflows/manual.yml and the resulting https://github.com/niphlod/docs/tree/multiple_pages

Looks good to me.

I'll go ahead tomorrow (more or less 24 hours from now) with the newly updated process.
I had a run-around comparing the current output with what was produced and needed to fix it (basically markdown in "gfm-style" renders soft-breaks with an automatic <br> while the one available in PS7 does not).
See dataplat/dbatools#7364 for the details on the small fixes.
https://github.com/niphlod/docs now reflects what will be on sqlcollaborative/docs (i.e. changes are directly done on the master and not on the multiple_pages branch)

aaaaand... we're up and running!

done.