-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Custom templates are failing when they contain filter use_code_language. #101
Comments
Hi a week ago, I have merged commit that fixed rendering code in document section. During this process, PR changed some Jinja files. Please look at this commit and try to change your local files. |
But that PR is included in the 1.2.0 release right ? It was actually my first guess : "Am I pulling the last version" To give more context : I'm only using github CI to deploy direcly, and my CI is getting mkDoxy using I've checked that pip is linked to 1.2.0. Either this is really a bug, or it is an edge case due to github CI VM ? |
Have you found the problem? Does it work fine after changing the custom Jinja file? owntech-foundation/Documentation@dbee656 |
Might I ask you what you are changing in the templates? Do you have some features that might also be included in the main branch? Thanks |
It works with custom templates that are not using use_code_language filter. I've tried importing all templates to replace them all -> not working. I guess the problem is located in generatorBase.py and the filter is not passed correctly to the template. But this problem is quite outside of my dev' skills unfortunately. I'm completely new to templating... I wanted to tweak memDef.jinja2 for cosmeting changes only. Mainly to had an Feature that might be interesting to add in the main branch in the templating :
at the beginning of the file for code.jinja2 and file.jinja2. This would rank down full code snippet in mkdocs search engine. It tends to be the first result each time, while it is not the most interesting bit of documentation. I've tried pulling that of myself today and yesterday, but without success so far.
But somehow it is not in the generated md file.. |
Oh, I have simulated your issue in my dev container, and I am trying to fix it. That is the real bug. |
The bug has been fixed in the last commit. |
I am looking at how to set it up correctly.
parseInt("0.5") => 0 |
I have tried to go across their documentation, and they support only boosting up. It looks like the default is 1, so it doesn`t exist as a lower value. If you find something better, I would appreciate it. |
https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/#search-boosting-rank-down I've tried to use that example from mkdocs material documentation. Material use the same lunr.js search engine, maybe its a documentation glitch ? Ranking down commodity pages such as code and files would be more elegant than ranking up all other pages, but if it only takes an integer maybe ranking up the rest would be the way to go ? |
Awesome ! I'll try it today 😄 |
Oh, I am confused. This project is probably using it, but I did not find any other on the whole GitHub. So, try it. Just add boost: 0.5 and look at results. |
I have added new PR with first prototype of implementing the custom configuration |
Okay, so here are my findings this morning : Here is my CI output :
Link to my test templates :
Test results :
Maybe something related to #35 ? |
Hi !
First, thanks for the amazing work, MkDoxy is a banger !
I'm facing the following issue :
Overriding memDef.jinja2 lead to the following error :
I guess somehow the filter is not correctly linked with the custom template ?
Any hints ?
The text was updated successfully, but these errors were encountered: