Skip to content
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

Is it possible to add additional parameters to mkdocs build? #165

Open
andboss opened this issue Jul 31, 2023 · 3 comments
Open

Is it possible to add additional parameters to mkdocs build? #165

andboss opened this issue Jul 31, 2023 · 3 comments

Comments

@andboss
Copy link

andboss commented Jul 31, 2023

Is it possible to add additional parameters to mkdocs build?

poetry run mike deploy ... --build-params $MKDOCS_BUILD_PARAMS

E.g. we want to avoid clean of output folder and add --dirty (https://www.mkdocs.org/user-guide/cli/#mkdocs-build)

@jimporter
Copy link
Owner

Sorry, no that's not possible. There shouldn't be any need to do that though (and in fact it could add stray files to your docs easily if you're not careful). What are you trying to accomplish?

@andboss
Copy link
Author

andboss commented Aug 1, 2023

Sorry, no that's not possible. There shouldn't be any need to do that though (and in fact it could add stray files to your docs easily if you're not careful). What are you trying to accomplish?

ok, thanks for the clarification! I'm trying to support artifacts that are already located in the same folder (that was cleaned before), e.g.:

  • build step before with some external docs gen, e.g.:
    • doxygen --> generates HTML stuff to doxygen/html
    • rm -rf public/
    • mkdir -p public/doxygen
    • mv doxygen/html/* public/doxygen
  • poetry run mkdocs build ... --dirty --> cleans up public and therefore some references to public/doxygen are not valid

wanted to keep same now for multi-versioning with mike, but the public folder is cleaned up and do not want to copy doxygen stuff after mike call as need to make sure the doxygen html can be referenced by md files and has to be there before...

I know the doxygen integration solution is simple and can be done may be better with some mkdocs plugin, but need first to investigate such plugin, may be you have some recommendation...

@jimporter
Copy link
Owner

jimporter commented Aug 9, 2023

I think a plugin is the best solution for this, but I think it should also work just fine to add your generated Doxygen docs to your MkDocs source directory (docs/doxygen or something). MkDocs should automatically include all the files for you when building.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants