Skip to content

Enable runtime switching of blog permalink formats#780

Merged
poppastring merged 4 commits into
mainfrom
improve-routing
Feb 22, 2026
Merged

Enable runtime switching of blog permalink formats#780
poppastring merged 4 commits into
mainfrom
improve-routing

Conversation

@poppastring
Copy link
Copy Markdown
Owner

Enable runtime switching of blog permalink formats

Refactor routing to support both unique (date-prefixed) and non-unique (title-only) blog post permalinks, using a new TitlePermaLinkUniqueConstraint that checks the setting at request time. Register all route patterns at startup, guarded by the constraint, allowing runtime toggling of permalink style and space replacement without app restart. Add integration tests to verify dynamic link and routing behavior. Improve null handling in BlogManager.GetBlogPost. Expose HostServices for testing.

Refactor routing to support both unique (date-prefixed) and non-unique (title-only) blog post permalinks, using a new TitlePermaLinkUniqueConstraint that checks the setting at request time. Register all route patterns at startup, guarded by the constraint, allowing runtime toggling of permalink style and space replacement without app restart. Add integration tests to verify dynamic link and routing behavior. Improve null handling in BlogManager.GetBlogPost. Expose HostServices for testing.
Removed the TitlePermaLinkUniqueConstraint and its registration, allowing both date-prefixed and title-only permalinks to always resolve regardless of the EnableTitlePermaLinkUnique setting. Updated route definitions and tests accordingly. The setting now only controls which link format is generated, not which URLs are accepted. Cleaned up related code and project structure.
Enhanced GetBlogPost to better normalize post titles for permalink matching, handling both non-unique and unique (date-prefixed) formats. Expanded Playwright tests to verify both permalink styles and navigation. Removed obsolete Routing folder from project file.
Removed all support for configurable space replacement in permalinks and categories. The separator is now always "-", with related config, UI, and tests deleted or refactored. This simplifies URL handling and eliminates the option to use "+".
@poppastring poppastring merged commit 453e229 into main Feb 22, 2026
3 checks passed
@poppastring poppastring deleted the improve-routing branch February 22, 2026 00:32
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.

1 participant