mkdocs / catalog

:trophy: :books: A list of awesome MkDocs projects and plugins.
Creative Commons Attribution Share Alike 4.0 International
1.01k stars 58 forks source link

Add project: mkdocs-torillic #222

Closed TEParsons closed 3 months ago

TEParsons commented 3 months ago

What kind of change does this PR introduce?

Description: Torillic - a Dungeons & Dragons inspired theme for styling TTRPG notes.

Checklist:

pawamoy commented 3 months ago

This is a torrific theme :sunglasses:! Thanks!

pawamoy commented 3 months ago

I'll trigger the README update right now, I want to see the preview in it :stuck_out_tongue:

TEParsons commented 3 months ago

Could you trigger it again? Realised I forgot to do a new PyPi release for a fix to a bug in the nav bar styling (which messes up the preview pretty bad :P )

pawamoy commented 3 months ago

Yep, noticed that (your theme was not the only one suffering from this issue), sure, will re-trigger :)

TEParsons commented 3 months ago

Hmm, still doesn't seem to be using the latest version from PyPi. How does the generator create the preview? Does it work off of the GitHub repo or the PyPi package?

pawamoy commented 3 months ago

Wait, I didn't trigger it yet (was outside). Doing it now. Ah and yes I have to re-deploy my mkdocs-gallery project first.

pawamoy commented 3 months ago

Hmm the gallery failed to build your theme, let me check.

pawamoy commented 3 months ago
  File "/media/data/dev/mkdocs-gallery/themes/torillic/.venv/lib/python3.11/site-packages/mkdocs/utils/__init__.py", line 259, in get_theme_dir
    return os.path.dirname(os.path.abspath(theme.load().__file__))
                                           ^^^^^^^^^^^^
  File "/home/pawamoy/.basher-packages/pyenv/pyenv/versions/3.11.5/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pawamoy/.basher-packages/pyenv/pyenv/versions/3.11.5/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'mkdocs_torillic'

Does that ring any bell?

pawamoy commented 3 months ago
% unzip mkdocs_torillic-2.3.0-py3-none-any.whl 
Archive:  mkdocs_torillic-2.3.0-py3-none-any.whl
  inflating: mkdocs_torillic-2.3.0.dist-info/LICENSE  
  inflating: mkdocs_torillic-2.3.0.dist-info/METADATA  
  inflating: mkdocs_torillic-2.3.0.dist-info/WHEEL  
  inflating: mkdocs_torillic-2.3.0.dist-info/entry_points.txt  
  inflating: mkdocs_torillic-2.3.0.dist-info/top_level.txt  
  inflating: mkdocs_torillic-2.3.0.dist-info/RECORD

Building/publishing issue?

TEParsons commented 3 months ago

Aha, took a bit of digging around but I've found the problem! You're right, it's a build issue - I'd used py-modules in the pyproject.toml when what I wanted was packages, so it was building an empty wheel -.- Will push a bug fix release and notify you when it's on PyPi

TEParsons commented 3 months ago

Okay, new version is up on PyPi, I tested installing from scratch too and it seems to work & build correctly, so give it another go now :)

pawamoy commented 3 months ago

Hmmm, old version might have been reused because of the pip cache, I'll try again tomorrow.

pawamoy commented 3 months ago

OK, looks better now. However your theme seems to have a broken navigation. The themes section should show links to every theme, but it just redirects to the first one.