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

Integration with mkdocs example does not work out of the box! #38

Open
stratosgear opened this issue Dec 10, 2023 · 5 comments
Open

Integration with mkdocs example does not work out of the box! #38

stratosgear opened this issue Dec 10, 2023 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@stratosgear
Copy link

stratosgear commented Dec 10, 2023

I followed the example setup described in https://entangled.github.io/mkdocs-plugin/ and I was not getting what I was expecting.

For example, I added the very simple example defined in https://entangled.github.io/mkdocs-plugin/#annotate-code-blocks I was following, but the python source files were not generated. I thought it was a matter of restarting the mkdocs serve command but still no python file generated.

I had to open a separate terminal and run there: entangled watch to get the behavior I was expecting, meaning the creation of a example/hello_world.py file (although, following along the mkdocs init example, I would expect the file to be named: src/example_package/hello_world.py so that it would end up in the source folder already created from mkdocs, but I divert)

Isn't it the idea to trigger the entangled functionality through the mkdocs hook? Or maybe the instructions miss a step that explains that a separate process needs to run in parallel?

Not sure what is the intended usage here.

Nonetheless I'm thrilled if I can get this to work smoothly! :)

@jhidding
Copy link
Contributor

jhidding commented Dec 10, 2023

Yes you're right. For some time I had entangled sync triggered by the mkdocs serve loop. This didn't always work as expected though. Entangled would not always be triggered when needed, leading to conflicts when both markdown and source code were changed. I had to disable the integration with the downside that you have to run entangled watch next to mkdocs serve.

In regard to the paths: Entangled takes all paths to be relative to the directory from which you run entangled.

@stratosgear
Copy link
Author

I am not clear then on the use of the entangled plugin in mkdocs. Or is that obsolete too?

@jhidding
Copy link
Contributor

It does transform the Markdown to render code blocks with a nice title. I do intend to extend support further (things like code navigation, figure captions) Just haven't found the time yet.

@stratosgear
Copy link
Author

Ah yes, now I see it, thanks.

I'm not negatively critical here, I am just trying to figure out where things are given the state of the demos/documentation. I'm starting using it now, so maybe I'll have more feedback later on.

I'll leave the issue open, here, maybe as a reminder that the online instructions are out of date, maybe needing fixing?

@jhidding
Copy link
Contributor

Yes, excellent!

@jhidding jhidding added the documentation Improvements or additions to documentation label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants