Follow

Do I have anyone in my network who would be able and interested to port some Pelican plugins to / Hugo for LOW←TECH MAGAZINE and solar.lowtechmagazine.com specifically?

boosts appreciated

· · Web · 5 · 12 · 8

@rra I guess, I will (with the help of @datacop). But likely I'll go for Publii instead of Hugo.

@yala we are considering redesigning the project around Hugo as we're running in to the limits of what is possible with Pelican (amount of content, multiple languages etc).

We do however have some custom plugins (github.com/lowtechmag/solar-pl, specifically dither and page_metadata) that would have to be recreated if we go down that route.

@rra Oh! The dither work is fantastic: I loved it when the Low Tech Mag came out.

Do you have some specifications about how this should be done, or is this an autodidact's journey?

@rra @yala I took a quick look and I'm pretty sure you could run these as a post-processing step. You could keep most of your python code and just munge the images & metadata as part of your build/deploy script. If you want to properly extend hugo it seems a bit tricky as there's no real system for plugins or piping to external commands. There's some notion of "modules" but I can't find any docs or examples.

@praxeology @rra @yala I wouldn't go into the trouble of switching language for the mere purpose of doing another static website. Also python has so many 3rd party libraries to do stuff. If you need extra features such as multi-language, blog content, and even user authentication/user backend, and a database, django would fit better for an existing python project. It could be integrated in the current website too.

@mara @praxeology @yala I'd also not normally steer away from python or from an existing codebase but Pelican is really not suited for large multilingual websites unfortunately. But I want it to remain static and solid, i.e. no hacky things because the site has been no maintenance since ever because we built it properly the first time around..

It currently takes 2 hours to build the website on the server.. And that is with caching and everything enabled.

Hugo has a lot of things we have as extensions in Pelican built internally and it is built with performance and multilingual content in mind. But we are still evaluating. The plugins are the largest hurdles currently..

@rra When hitting a limitation of Pelican, we've been able to work around it by adding pre- and post-processing commands to the makefiles (e.g. we ditched the Pelican-assets plugin for a simple extra command in make build for building Sass files).

And when it really need be, we have a plain generate.py script that renders a single file with any template and places it where we want in the output/ dir. A dirty hack, but might work with complex multilang setups that don't cover everything.

@rra the metadata part you could probably just create on the fly when rendering the pages by using the built-in hugo functions like this example of using countwords to get reading time https://kodify.net/hugo/strings/reading-time-text/

but I don't know enough about hugo and your plugins to tell if you could replicate everything

@rra I could maybe help! Is this paid or volunteer work?

In any case, I've created a dither library for Go that you will probably want to use anyway.

https://github.com/makeworld-the-better-one/dither

At the very least I could answer questions and provide support for anyone who's working with my library.

@rra I don't really have the necessary skills (not a real programmer) but I am extremely interested in this project. I have some experience with Hugo, you can see the minimalist theme I'm working on here: https://git.sr.ht/~skyfaller/maxethics-hugo

I'd love to help in any way I can.

Sign in to participate in the conversation
post.lurk.org

Welcome to post.lurk.org, an instance for discussions around cultural freedom, experimental, new media art, net and computational culture, and things like that.

<svg xmlns="http://www.w3.org/2000/svg" id="hometownlogo" x="0px" y="0px" viewBox="25 40 50 20" width="100%" height="100%"><g><path d="M55.9,53.9H35.3c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3h20.6c0.7,0,1.3-0.6,1.3-1.3S56.6,53.9,55.9,53.9z"/><path d="M55.9,58.2H35.3c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3h20.6c0.7,0,1.3-0.6,1.3-1.3S56.6,58.2,55.9,58.2z"/><path d="M55.9,62.6H35.3c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3h20.6c0.7,0,1.3-0.6,1.3-1.3S56.6,62.6,55.9,62.6z"/><path d="M64.8,53.9c-0.7,0-1.3,0.6-1.3,1.3v8.8c0,0.7,0.6,1.3,1.3,1.3s1.3-0.6,1.3-1.3v-8.8C66,54.4,65.4,53.9,64.8,53.9z"/><path d="M60.4,53.9c-0.7,0-1.3,0.6-1.3,1.3v8.8c0,0.7,0.6,1.3,1.3,1.3s1.3-0.6,1.3-1.3v-8.8C61.6,54.4,61.1,53.9,60.4,53.9z"/><path d="M63.7,48.3c1.3-0.7,2-2.5,2-5.6c0-3.6-0.9-7.8-3.3-7.8s-3.3,4.2-3.3,7.8c0,3.1,0.7,4.9,2,5.6v2.4c0,0.7,0.6,1.3,1.3,1.3 s1.3-0.6,1.3-1.3V48.3z M62.4,37.8c0.4,0.8,0.8,2.5,0.8,4.9c0,2.5-0.5,3.4-0.8,3.4s-0.8-0.9-0.8-3.4C61.7,40.3,62.1,38.6,62.4,37.8 z"/><path d="M57,42.7c0-0.1-0.1-0.1-0.1-0.2l-3.2-4.1c-0.2-0.3-0.6-0.5-1-0.5h-1.6v-1.9c0-0.7-0.6-1.3-1.3-1.3s-1.3,0.6-1.3,1.3V38 h-3.9h-1.1h-5.2c-0.4,0-0.7,0.2-1,0.5l-3.2,4.1c0,0.1-0.1,0.1-0.1,0.2c0,0-0.1,0.1-0.1,0.1C34,43,34,43.2,34,43.3v7.4 c0,0.7,0.6,1.3,1.3,1.3h5.2h7.4h8c0.7,0,1.3-0.6,1.3-1.3v-7.4c0-0.2,0-0.3-0.1-0.4C57,42.8,57,42.8,57,42.7z M41.7,49.5h-5.2v-4.9 h10.2v4.9H41.7z M48.5,42.1l-1.2-1.6h4.8l1.2,1.6H48.5z M44.1,40.5l1.2,1.6h-7.5l1.2-1.6H44.1z M49.2,44.6h5.5v4.9h-5.5V44.6z"/></g></svg>