Open jalinei opened 2 months ago
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.
https://github.com/JakubAndrysek/MkDoxy/commit/ebfa436cd9973009e722d0330669c98b1c08b097
But that PR is included in the 1.2.0 release right ? I've checked by downloading the files and I do see the commit #ebfa436
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
pip install mkdoxy
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? https://github.com/owntech-foundation/Documentation/commit/dbee6566d3f6dc92e29290241f8c4ace4897253f
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 <hr>
tag above each ### titles to have better readability in the class page.
( for instance in this page : https://owntech-foundation.github.io/Documentation/powerAPI/classTwistAPI/ I believe an <hr>
tag between functions would improve the experience)
Feature that might be interesting to add in the main branch in the templating : Adding
----
search:
boost: 0.5
----
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. I've tried escaping using
{{ raw }}
----
search:
boost: 0.5
----
{{ endraw }}
But somehow it is not in the generated md file..
I am adding the <hr>
tag to the main branch, as you described. It looks nice.
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.
The boost value can be any positive integer
I am looking at how to set it up correctly.
----
search:
boost: 0.5
----
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.
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 ?
The bug has been fixed in the last commit.
Awesome ! I'll try it today :smile:
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 exclude-search: files
But It needs more time to implement it fully.
Okay, so here are my findings this morning : With 1.2.1 adding a custom template using use_code_language no longer breaks doc publication. Although project level templating seems not to be working yet.
Here is my CI output :
Run mkdocs gh-deploy --force
INFO - [macros] - Macros arguments: {'module_name': 'main', 'modules': [], 'render_by_default': True, 'include_dir': '', 'include_yaml': [], 'j2_block_start_string': '', 'j2_block_end_string': '', 'j2_variable_start_string': '', 'j2_variable_end_string': '', 'on_undefined': 'keep', 'on_error_fail': False, 'verbose': False}
INFO - [macros] - Extra variables (config file): ['ownplot', 'social', 'images']
INFO - [macros] - Extra filters (module): ['pretty']
INFO - Cleaning site directory
INFO - Building documentation to directory: /home/runner/work/Documentation/Documentation/site
INFO - Start plugin MkDoxy
INFO - -> Start project 'powerAPI'
INFO - -> generating Doxygen files
INFO - Overwriting template 'memDef' with custom template.
INFO - Overwriting template 'code' with custom template.
INFO - -> Start project 'controlLibrary'
INFO - -> generating Doxygen files
INFO - DeprecationWarning: A plugin has set File.page to an instance of Page and it got overwritten. The behavior of this will change in MkDocs 1.6.
Link to my test templates :
<hr>
changed from ef1bed19a9ad657386a4748a477e867f8b6b27a7 for validationTest results :
<hr>
tagsMaybe 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 ?