Pelican-Elegant / elegant

Best theme for Pelican Static Blog Generator
https://elegant.oncrashreboot.com/
MIT License
293 stars 187 forks source link

'.html' is hardcoded on Categories, Tags, and Archives #22

Closed tshepang closed 5 years ago

tshepang commented 11 years ago

I saw this in templates/base.html.

talha131 commented 11 years ago

@tshepang that's because there is no other way to link to those pages. If you see the URL settings of Pelican you will notice you can customize the URL of article, tag or category page. But you cannot customize URL of categories and tags page.

That's why for article, you can use article.url or for tag tag.url.

But there is no variable tags.url for tags.html page. This is why I have to hardcode it.

Hope it explains the reason.

tshepang commented 11 years ago

This issue must be reported on Pelican?

talha131 commented 11 years ago

Well it is not a bug.

It can be requested as an enhancement "Let users customize URL of archives, categories and tags pages".

tshepang commented 11 years ago

I don't fully understand the issue, but have created a workaround for now: https://bitbucket.org/tshepang/patches/src/7e7dc47c/elegant.diff.

talha131 commented 11 years ago

Thanks @tshepang for sharing your solution. That's a good solution.

Question is how do we know what user wants. Take article URL as an example. User can configure it in the pelican-conf

ARTICLE_URL = u'{slug}'

Articles URL will not have .html in the end.

But user can also configure it to

ARTICLE_URL = u'{slug}.html'

The article URL will have .html in the end. So you can configure the article URL from pelicanconf.py.

Is there a way to configure Categories, Tags and Archives URL? No there isn't. So if we remove .html like you did, it will not work for those users who want their URLs to end with an .html.

Let me know what you think about it? Also feel free to ask if any point is unclear.

tshepang commented 11 years ago

I am aware mine is an ugly work-around, that's why I'm not proposing that you include it.

tshepang commented 11 years ago

BTW, I see that there's a TAGS_URL, TAGS_SAVE_AS and ARCHIVES_SAVE_AS settings. Wouldn't they help?

talha131 commented 11 years ago

@tshepang excellent find.

I need to ask Pelican team why we don't have CATEGORIES_URL, CATEGORIES_SAVE_AS, and ARCHIVES_URL. Something is amiss. I think we will be able to make a better decision after their clarification.

Thanks man!

tshepang commented 11 years ago

koolnes

talha131 commented 11 years ago

This issue is related to Pelican

tshepang commented 11 years ago

Yes, I've been following the discussion there.

tshepang commented 10 years ago

Looks like this was already fixed in Pelican, only not documented?

talha131 commented 10 years ago

Related to https://github.com/getpelican/pelican/issues/1225

tshepang commented 6 years ago

this went stale, so closing

iranzo commented 5 years ago

Is this still the case? updates are from some years ago, but still I do see hardcoded archives, tags and categories while my pelican setup does use /tags/ vs /tags.html and likelywise for the others

silverhook commented 5 years ago

If this still happens, we should address it IMHO.

On my website, it does seem to still be the case, so re-opening.

iranzo commented 5 years ago

I was trying to find a new theme that is responsive for mobile devices and doing initial 'simple' checks found this :/

silverhook commented 5 years ago

@iranzo We have just expanded Elegant from a single maintainer to a community-driven projects and are currently picking up the pace again, so it’s a great time to get involved (see #173 for more).

I can’t promise we’ll be able to tick all your checkboxes, but if you see anything missing (or better yet, have a proposal/pull request), please do file an issue.

iranzo commented 5 years ago

I saw it, but I'm not an expert in pelican (nor to talk about elegant), and so far just did some small patch some years ago for blue-penguin theme I'm currently using at my site.

Please do assign this to me as I think I can do it

silverhook commented 5 years ago

I’m not even a coder and fixing stuff in Elegant (or any other Jinja-based theme) is very doable. So I’m sure you’ll rock it! :metal:

Hmmm, odd, it doesn’t seem like I can assign it to you, @iranzo. Can you try to assign it to yourself?

iranzo commented 5 years ago

https://github.com/Pelican-Elegant/elegant/pull/186

iranzo commented 5 years ago

I’m not even a coder and fixing stuff in Elegant (or any other Jinja-based theme) is very doable. So I’m sure you’ll rock it!

Hmmm, odd, it doesn’t seem like I can assign it to you, @iranzo. Can you try to assign it to yourself?

Probably as I'm not member of the project staff you can't do that (I had a similar issue with a project I own)

silverhook commented 5 years ago

That makes sense. I don’t have a lot of experience with admining a project that has several outside contributors.

I’ll assign myself then, so it’s my fault if this doesn’t push forward.

The way I understand it, as soon as your pull request gets merged, you should be able to be assigned issues as well.

iranzo commented 5 years ago

@silverhook check https://iranzo.github.io/ and try the tags, categories, archives

iranzo commented 5 years ago

I did submitted the PR, so it should be someone else to validate and merge :-)