Add minimal alias layout page with OpenGraph data#1008
Open
dozro wants to merge 2 commits into
Open
Conversation
a minimal alias layout page for aliases including some basic opengraph data, for people sharing alias urls
Alias pages are redirects and should not be classified as articles.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a minimal alias layout page for aliases including some basic opengraph data, for people sharing alias urls
Prerequisites
Put an
xinto the box(es) that apply:Description
Motivation
Alias URLs can be useful as stable references that remain unchanged even when content is reorganized or moved between sections of a site.
In my case, blog and developer content generate permalinks independently, which makes it difficult to move content between those sections while preserving a stable URL.
Additionally, when sharing alias URLs on social media, link previews were missing because alias pages did not expose any Open Graph metadata (bc aliases are by default html redirects, and leave link preview crawlers often behind while a human clicking would still get where they would expect to go by the preview).
This PR adds support for a dedicated alias page layout and optional Open Graph metadata to improve the sharing experience for alias URLs.
Note: The page is minimal and without styling as a user should ideally never get stuck at that page. And it doesn't use the internal opengraph templates, bc they are a bit verbose and you'd want that page to load as quickly as possible (so users won't notice the redirect as much) and only have that opengraph data to show a better experience then a bare url would be, anyhow switching to the internal templates would be possible if wanted.
Changes
I added a simple, minimal alias layout, which has the optional ability to have opengraph data (controlled via the params.aliases config option, unsure actually if thats clean that way, if not lmk).
Issues Resolved
List any existing issues this pull request resolves.
Checklist
Put an
xinto the box(es) that apply:General
#<ISSUE_NO>if applicableResources
make releaseto regenerate all CSS filesContributors
CONTRIBUTORS.mdif you aren't on it already