Skip to content

Add theme prettybasic #190

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add theme prettybasic #190

wants to merge 2 commits into from

Conversation

hejowhat
Copy link

changed the name from 'minja2'/' base' to 'prettybasic'.
Changed the names of the templates that are still needed.

Had to change the name of the git branch. I hope it doesn't get to confusing.

@Kwpolska Kwpolska mentioned this pull request Jun 14, 2020
@@ -0,0 +1,25 @@
{# -*- coding: utf-8 -*- #}
{% extends 'prettybasic.tmpl' %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base file should be called base.tmpl. If you don’t do that, you can end up with pages looking the wrong way because of missing templates.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems I had misunderstood your yesterday's request. I am going to undo the changes.

@@ -0,0 +1,16 @@
{% macro css() %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After you undo the base.tmplprettybasic.tmpl rename, please compare your template files to the ones in base-jinja, and if the files are identical, remove your copy so that the copy in base-jinja is inherited.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I really need to remove those duplicate templates? I would like to keep them because I still work on the them and I would like to keep everything in place to improve my understanding of Jinja2. I mean, if it leads to problems I would remove them for this repo and keep them in my dev environment, but it would save some time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you do. Feel free to keep them in a local copy, or copy them again from base-jinja (with nikola theme -c) when you do make changes to them, and feel free to override template files if you want to change their appearance. But by copying templates you didn’t modify, you make any changes to Nikola itself harder. Some of the templates you copied are effectively Nikola-internal and themes on the index should never copy them (like comment helpers). For the rest, we would have to edit every theme when we make some changes to the more “general” templates – for example, many themes don’t edit gallery.tmpl, because our implementation fits them well, and it lets us improve the gallery code for more themes with just one change in core.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thank you for this explanation.

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

Successfully merging this pull request may close these issues.

2 participants