Closed Yuubari closed 5 years ago
Did you define SLUG_REGEX_SUBSTITUTIONS
or CATEGORY_REGEX_SUBSTITUTIONS
? If so, you removed the bit that would handle stripping #
.
No, I am using the default set-up.
Can you share your settings file?
Default config handles it fine:
>>> from pelican.settings import DEFAULT_CONFIG
>>> from pelican.urlwrappers import Category
>>> CUSTOM_CONFIG = DEFAULT_CONFIG.copy()
>>> CUSTOM_CONFIG['CATEGORY_REGEX_SUBSTITUTIONS'] = []
>>> cat_default = Category('C#', DEFAULT_CONFIG)
>>> cat_changed = Category('C#', CUSTOM_CONFIG)
>>> cat_default.save_as
u'category/c.html'
>>> cat_changed.save_as
u'category/c#.html'
Here (I removed the SITE_
variables and similar cosmetic stuff):
TIMEZONE = 'Asia/Tokyo'
DEFAULT_LANG = 'en'
THEME = "pelican-themes/gum"
PLUGIN_PATHS = ['pelican-plugins']
PLUGINS = ['photos', 'more_categories', 'pelican-open_graph']
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
DISPLAY_PAGES_ON_MENU = False
# Blogroll
LINKS = (('Azur Lane Wiki', 'https://azurlane.koumakan.jp/'),
)
# Social widget
#SOCIAL = (('Twitter', 'https://twitter.com/Xiatian'),
# )
DEFAULT_PAGINATION = 10
Could it be the more categories plug-in?
more_categories
<- this needs update for pelican 4
.
@Yuubari: Hopefully the fix by @oulenz will address the issue you described. In the future, please try testing with a truly stock set-up, and then gradually add plugins one-by-one, add back the custom theme, etc., as noted in the How to Get Help section of the documentation. Thanks!
I have a category that is named “C#” for posts related to the C# language. Pelican seems to name the output file
c#.html
and refer to that file in plain text, resulting in a request for/c
that returns 404.Is there some sort of a work-around for this?