Skip to content
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

Broken themes #645

Open
ivanhercaz opened this issue May 9, 2019 · 3 comments
Open

Broken themes #645

ivanhercaz opened this issue May 9, 2019 · 3 comments

Comments

@ivanhercaz
Copy link
Contributor

I am trying to set up the new version of my personal website with Pelican and GitHub Pages. I would like to use another theme, not the default one, but in most of them I get this error:

CRITICAL: TypeError: not all arguments converted during string formatting
make: *** [Makefile:75: publish] Error 1

My Pelican's version is 4.0.1, but I think it also happens with 3.7.1 because I executed make github one time out of my environment and I get the same error. This error has been addressed in getpelican/pelican#2489, although I don't know nor understand why the issue is closed when the error persists.

The website don't offer any way to filter it nor the themes have sufficient data to know if one is supported by one or another version of Pelican. Thus I want to emphasize in the importance of #630 and #354.

The given "solution" in the mentioned issue is to change every part of the error that is wrong (replace pipes by dots, and some things more), but it is a bit heavy to make it soon and if someone want to set up quickly a website with Pelican . Thus I also want to compile here the templates that produce this error with all the possible details to solve it in the future.

Theme Has error? Comments
Apricot Yes Latest commit: 28 Feb 2016
Attila Yes Latest commit: 19 Sep 2016 (there is a development version but fails too)
Backdrop Yes Latest commit: 10 Sep 2016
Clean Blog Yes Latest commit: 5 Sep 2015
Nest Yes Latest commit: 22 Sep 2015

And probably there are more... I just checked some of them, but I think it is necessary, with patience, to review every theme in the repository. For the moment I am going to use the pelican-blue theme, it works fine. But I can confirm that cebong and Flex themes works too.

@iranzo
Copy link
Contributor

iranzo commented Jun 27, 2019

What I did is to check the latest update on each repo and decide... in the end I went for Pelican-Elegant which has been pretty active and even accepting contributions to the things I found missing

@leekimber
Copy link

leekimber commented Feb 18, 2022

Versions of Medius and pelican-html5up-spectral with this specific issue fixed are available in my repo.

The problem seems reasonably simple to fix once you know the ins and outs of it:

  1. Open the theme's templates/base.html file
  2. Replace all instances of "|format(" with ".format(slug='" and then all instances of ".slug)" with ".slug')"
  3. Save and test.

Here are my vim editor commands to fix it in the base.html file:

  1. :%s/|format(/.format(slug='/gc
  2. :%s/.slug)/.slug')/gc

Theoretically, it's possible to run these two search and replaces across the entire set of theme repositories. I'd be up for doing that if others are up for testing the results. :-)

This problem being present in so many themes (due to pelican's popularity and heritage) leaves me wondering if it would be more viable to manage a showcase of known-working themes (perhaps using a tool like this). Then de-list problematic themes or send them to a 'For repair' site where they can be fixed by those with an interest.

Put another way, the fix seems easy; the challenge is managing the ongoing maintenance of so many themes.

Mimoza referenced this issue in pythonpt/pythonpt.github.io-src Mar 8, 2022
Mimoza added a commit to Mimoza/pelican-themes that referenced this issue Mar 8, 2022
In order to repair this theme, with this issue like example : getpelican#645
@Mimoza Mimoza mentioned this issue Mar 8, 2022
@maphew
Copy link
Contributor

maphew commented Dec 31, 2022

related: #677

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants