Closed CNBorn closed 12 years ago
I solved the problem I was encountering by modified templates/pagination.html.
there are the procedures that you can reproduce the problem.
My URL settings is the following
ARTICLE_URL = '{date:%Y}/{date:%m}/{slug}/' ARTICLE_SAVE_AS = '{date:%Y}/{date:%m}/{slug}/index.html' TAG_URL = 'tag/{name}/' TAG_SAVE_AS = 'tag/{name}/index.html' PAGE_URL = 'pages/{slug}/' PAGE_SAVE_AS = 'pages/{slug}/index.html' CATEGORY_URL = 'category/{name}/' CATEGORY_SAVE_AS = 'category/{name}/index.html' AUTHOR_SAVE_AS = False
hence I could make my blog's url like
instead of (the default setting)
the index pagination url becomes:
the tag pagination url becomes:
but the template I'm using currently don't support my tag pagination well. It always look for /tag/cambodia2/
I have to modify templates/pagination.html accordingly to fit my url settings. here is how I've done.
My question is, when we are changing the URL settings as we want, we DO have to change the template/pagination in order to get our pagination works in our customized way, is it a little bit annoying?
This problem is somehow duplicate of page_name in Tag and Category pages does not honor TAG_URL/CATEGORY_URL setting and Fix for page_name usage to follow AUTHOR_URL, TAG_URL, and CATEGORY_URL definition.
I have such settings in pelican config:
TAG_URL = 'tag/{name}/' TAG_SAVE_AS = 'tag/{name}/index.html'
which will make my tag page like this:
/blog/tag/tag_name/
but when i do pagination, the link lead to
/blog/tag/tag_name2.html
which lead to a 404.