dataplat / docs

The documentation for dbatools module. Issues with command doc and bugs should be reported to dataplat/dbatools.
https://docs.dbatools.io
15 stars 12 forks source link

Write HTML to disk #36

Closed potatoqualitee closed 3 years ago

potatoqualitee commented 4 years ago

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

niphlod commented 4 years ago

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

niphlod commented 4 years ago

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

potatoqualitee commented 4 years ago

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

niphlod commented 4 years ago

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

niphlod commented 4 years ago

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.

wsmelton commented 3 years ago

@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?

niphlod commented 3 years ago

I'm getting closer ti prepare something that will output a page for each command, and optionally the md for it, in order to hook it up maybe to a gh action. Other than being a SPA and not easily indexable (thing that will be fixed by having each function its page) what's the pressure behind changing how we build the docs?

Il sab 28 nov 2020, 20:27 Shawn Melton notifications@github.com ha scritto:

@niphlod https://github.com/niphlod most doc sites I've hit for readthedocs are fairly smooth in browsing when I've used it. Invoke-IR/PowerForensics https://github.com/Invoke-IR/PowerForensics uses it here https://powerforensics.readthedocs.io/en/latest/modulehelp/Get-ForensicAmcache/

I've seen michaeltlombardi/mkdocs-psinder https://github.com/michaeltlombardi/mkdocs-psinder project on his demo site https://michaeltlombardi.github.io/mkdocs-psinder/. 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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sqlcollaborative/docs/issues/36#issuecomment-735280029, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA52B4YD6Q3EFUBTZP777TSSFFIJANCNFSM4JEYBFJA .

wsmelton commented 3 years ago

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?

niphlod commented 3 years ago

Nope, that is fairly easy, it's the same logic that is there already in find-dbacommand and the js bit in the page. Tbf the "poc" has been complete for a while now and @potatoqualitee has a copy, the "hardest" part is getting a few hours to make some tests, choose the layout of the resulting "links" and make it runnable in actions.

Il sab 28 nov 2020, 21:07 Shawn Melton notifications@github.com ha scritto:

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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sqlcollaborative/docs/issues/36#issuecomment-735284476, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA52BZHM34TXD6CFS66GTLSSFKAHANCNFSM4JEYBFJA .

wsmelton commented 3 years ago

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

niphlod commented 3 years ago

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:

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

niphlod commented 3 years ago

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

wsmelton commented 3 years ago

Looks good to me.

niphlod commented 3 years ago

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 https://github.com/sqlcollaborative/dbatools/pull/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)

niphlod commented 3 years ago

aaaaand... we're up and running!

niphlod commented 3 years ago

done.