NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
460 stars 105 forks source link

mkdocs: Copy media and extra.css files to build folder #112

Closed cunningr closed 4 years ago

cunningr commented 4 years ago

currently I am using a small shell script to workaround this. E.g.

$ cat builddocs.sh
#!/bin/bash
pydoc-markdown docs/pydoc-markdown.yml
cp -r docs/media build/docs/docs/
cp docs/extra.css build/docs/docs/
mkdocs gh-deploy -f build/docs/mkdocs.yml
NiklasRosenstein commented 4 years ago

Hey @cunningr,

How about we add an option to specify actions to perform after rendering?

post_render:
  - action: rsync
    paths:
      - docs/media:build/docs/docs
      - docs/extra.css:build/docs/docs

(Note that I'm using build/docs/content because v3.0.3 will change the default docs dir from build/docs/docs to build/docs/content)

cunningr commented 4 years ago

I guess that works and provides a nice generic way to keep everything together

Thanks!

On Sat, 16 May 2020 at 14:05, NiklasRosenstein notifications@github.com wrote:

Hey @cunningr https://github.com/cunningr,

How about we add an option to specify actions to perform after rendering?

post_render:

  • action: rsync paths:
    • docs/media:build/docs/docs
    • docs/extra.css:build/docs/docs

(Note that I'm using build/docs/content because v3.0.3 will change the default docs dir from build/docs/docs to build/docs/content)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NiklasRosenstein/pydoc-markdown/issues/112#issuecomment-629642766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDBWJ5VA4VYUZEVZGZEFILRR2FSPANCNFSM4NC2E3EA .

NiklasRosenstein commented 4 years ago

Hey @cunningr , You can now use $.hooks.post-render in Pydoc-Mardown v3.2.0. Example from Pydoc-Markdown's own config file:

https://github.com/NiklasRosenstein/pydoc-markdown/blob/ad365888a6ba00313e19e7b9bb34797870861ea0/pydoc-markdown.yaml#L4-L6