Closed Mara-Li closed 1 year ago
Hi @Lisandra-dev
I'm trying to understand what happens. I'm puzzled because if I pass the wrong arguments to the filter I get a contextual error
{% set test = "comments" | value_in_frontmatter() %}
E TypeError: value_in_frontmatter() missing 1 required positional argument: 'metadata'
So it looks like it knows the function filter... only when we pass the correct arguments we get the unknown filter error...
New finding: it breaks on added language builds, but it works on the main language
@Lisandra-dev could you please test with #183 ?
Hello! I tryed with my two-language branch but, now, I get this :
INFO - Cleaning site directory
Traceback (most recent call last):
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\lilis\anaconda3\envs\Publisher\Scripts\mkdocs.exe\__main__.py", line 7, in <module>
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\click\core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\mkdocs\__main__.py", line 234, in serve_command
serve.serve(dev_addr=dev_addr, livereload=livereload, watch=watch, **kwargs)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\mkdocs\commands\serve.py", line 83, in serve
builder(config)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\mkdocs\commands\serve.py", line 76, in builder
build(config, live_server=live_server, dirty=dirty)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\mkdocs\commands\build.py", line 302, in build
nav = config.plugins.run_event('nav', nav, config=config, files=files)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\mkdocs\plugins.py", line 520, in run_event
result = method(item, **kwargs)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\mkdocs_static_i18n\plugin.py", line 418, in on_nav
nav = folder_structure.on_nav(self, nav, config, files)
File "C:\Users\lilis\anaconda3\envs\Publisher\lib\site-packages\mkdocs_static_i18n\folder_structure.py", line 368, in on_nav
raise Exception(f"could not find homepage Page(url='{expected_url}')")
Exception: could not find homepage Page(url='en/')
@Lisandra-dev this comes from the rather unexpected _obsidian
folder in your docs which is creating a weird navigation tree... what is that supposed to mean / do ?
Oh, it's because I opened the folder in Obsidian, and forgot to delete it when switching branch! Work as expected when deleting these folder :)
FYI I released 0.54 with the fix.
Configuration :
Removing i18n make the build successfull.
Log :
Steps :
overrides/hooks/on_env.py
) modifying template filter (here is my file)hooks
part of the mkdocs.ymlmkdocs serve