Jieiku / abridge

Fast & Lightweight Zola Theme
https://abridge.pages.dev/
MIT License
142 stars 41 forks source link

Issues with `next` v0.18+ #164

Closed wold5 closed 2 weeks ago

wold5 commented 3 months ago

Hi, Abridge works fine with v0.18, but breaks when testing the current next (up to and https://github.com/getzola/zola/commit/4bf67afd875b99d2bad6fe252d6fb6e44f52b313). Thought I'd give you a heads up.

  1. Translation menus don't substitute dashes properly: instead of /nl/software/ its //nlsoftware/ Changing https://github.com/Jieiku/abridge/blob/d45bc26c2250f573a0d83f755831857999fc125f/templates/base.html#L76-L77 to use to=config.base_url ~ lcode ~ '/') fixes it for next, but breaks 0.18.

  2. The logo gets a double // in next(the config base_url omits the dash, as recommended) It's fixable by removing the dash here https://github.com/Jieiku/abridge/blob/d45bc26c2250f573a0d83f755831857999fc125f/templates/base.html#L37-L38

Of the recent commits these two come to mind: https://github.com/getzola/zola/commit/4bf67afd875b99d2bad6fe252d6fb6e44f52b313 (--base-url) https://github.com/getzola/zola/commit/73e06bd4cf0712d2f36675334c29594cb2fb9b34 (get_page/get_section language argument)

Jieiku commented 3 months ago

excellent, thank you. I wonder if these are intended changes or not, will keep an eye on the zola release. (I have it watched on github)

wold5 commented 3 months ago

You're welcome. Will keep building with 0.18 for now.

By chance, having just added a site translation, constructing a section path requires code similar to that linked in (1) 😛 So curious what you come up with. Might even fix it myself 😉

Jieiku commented 2 weeks ago

Zola 0.19 just dropped. I drafted a release of abridge to preserve a compatible version for 0.18.

It looks like your original bug report might have been resolved before 0.19 was released, I am not seeing those issue currently. I did however have to disable the feeds in config.toml:

generate_feeds = false

I believe it might be related to https://github.com/getzola/zola/pull/2477

filed an issue report here: https://github.com/getzola/zola/issues/2537

wold5 commented 2 weeks ago

Tonight or tomorrow I'll check this out. Would have done so now, but the whole lot needs syncing and updating, etc.

Jieiku commented 2 weeks ago

I just updated abridge for 0.19.1 so far everything seems OK and the demo is functioning properly.

wold5 commented 2 weeks ago

Confirmed, 0.19/0.19.1 works here too, on Windows, with the latest Abridge.

I did however have to disable the feeds in config.toml:

Same here, ==but for a different reason it seems== otherwise it throws this error, on multiple pages:

Error: Failed to serve the site
Error: Failed to render page '\\?\C:\Users\...\syncoda\content\pages\offline.md'
Error: Reason: Failed to render 'pages.html' (error happened in 'base.html').
Error: Reason: Test call 'containing' failed
Error: Reason: Tester `containing` was called on an undefined variable

PS C:\Users\...\syncoda> .\bin\zola-191.exe --version
zola 0.19.1

This seems a different issue?

Also had to remove

[languages.nl]
#language_name = "Nederlands" <---

which appears to be baked in now, it seems.

Thank you for your responses!

Jieiku commented 2 weeks ago

With the latest abridge you just need to update your config.toml and replace all occurrences of

generate_feed = true with generate_feeds = true

Then after updating Zola to 0.19.1 your Atom feed should work properly.

In the demo I also removed the language_name from config.toml back at 0.18.0 when the i18n folder was added.

wold5 commented 2 weeks ago

It works now. The Abridge /themes/ submodule wasn't updated, still at the previous version or the long words commit (30dfea21f6e134c706fe5076ce6ff148a011e901). If you checkout 30dfea21f6e134c706fe5076ce6ff148a011e901 it will throw the same error. Using multiple machines here...

With the latest abridge you just need to update your config.toml and replace all occurrences of

generate_feed = true with generate_feeds = true

Then after updating Zola to 0.19.1 your Atom feed should work properly.

The 0.19 changelog mentioned that variable and feed_filenames, so I had changed those. Next I faultily assumed your remark was a WIP fix for the issue described. Good reminder to always check assumptions ;-)

As for Windows, the here used method is: