-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add Project: mkdocs-landing #261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks for pulling this in :) So this will become visible when |
Yes, it happens once a week. I can retrigger it manually today though 👍 |
Hmm, looks like the preview isn't working, do you need to rebuild mkdocs-gallery too? |
Oh yes, probably, good catch. |
Rebuilding the gallery right now. |
I'm getting this error: Traceback (most recent call last):
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/bin/mkdocs", line 8, in <module>
sys.exit(cli())
^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/mkdocs/__main__.py", line 288, in build_command
build.build(cfg, dirty=not clean)
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/mkdocs/commands/build.py", line 337, in build
_build_page(
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/mkdocs/commands/build.py", line 223, in _build_page
output = template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render
self.environment.handle_exception()
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/mkdocs_landing/main.html", line 12, in top-level template code
{% include "partials/header_element.html" %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/mkdocs_landing/partials/header_element.html", line 24, in top-level template code
{{ config.theme.tagline | markdown(id="tagline") }}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/mkdocs_landing/filters.py", line 33, in parse_markdown
html = md.convert(text)
^^^^^^^^^^^^^^^^
File "/media/data/dev/mkdocs-gallery/themes/landing/.venv/lib/python3.12/site-packages/markdown/core.py", line 341, in convert
if not source.strip():
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'strip' Do I have to add extra config to mkdocs.yml ( |
Ahh, yes, I didn't supply a default for that so I need to handle when it's undefined. But yes if you're able to, just supplying a value for theme.tagline will do the trick. Otherwise I'll fix that in the next version & let you know when it's on pypi. |
Thanks!
That'd be great, the gallery builds each theme with a common template, to fix that I'd have to special case mkdocs-landing 😅 There might be other undefined variables that could cause issues so don't hesitate to let me know when you push fixes so that I can test locally and give you feedback on potential errors 🙂 |
Okay, I've released a new version! Here's the release: https://github.com/TEParsons/mkdocs-landing/releases/tag/0.0.4 I also added a test suite and added a test that a site with no configuration at all builds, which should catch this in future. Could you link me to the specific mkdocs.yaml used to build site previews in the gallery? I'll add it to my test suite (and implement the same sort of thing for Torillic too :P ) |
Great 🎉 Let me try to rebuild the gallery. Sure, here's the template: https://github.com/pawamoy/mkdocs-gallery/blob/main/templates/specimen/mkdocs.yml. |
OK, good, preview now working 😄 |
What kind of change does this PR introduce?
Description:
Adds the mkdocs theme "Landing" to the catalogue - a theme designed for making personal landing pages. See Landing's website for documentation and example implementations.
Checklist:
README.md
file. Projects are only supposed to be added or updated within theprojects.yaml
file since theREADME.md
file is automatically generated.