Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add related content support and navigation using keywords #8

Merged
merged 11 commits into from
Jan 17, 2024

Conversation

rezrah
Copy link
Collaborator

@rezrah rezrah commented Jan 16, 2024

Adds feature to enable related content through Markdown front matter.

🔗 Try it here

How it works

Related content links appear on all content pages, except the homepage. They are located beneath the main content.

The links are generated through a combination of keywords and related links for maximum flexibility and catchment of content, all of is are managed via the Markdown files frontmatter.

Non-specific keywords

The easiest way to link pages is through sharing related keywords. E.g. accessibility, branding etc.

The technical approach works by reading the optional keyword property in front matter, and finding matches in adjacent pages. If matches are found, a Related content navigation menu will appear beneath the main content.

Specific links

For scenario's wher fine-grained control is required for cross-linking, such as external links or custom labels, a related key is also available which accepts a more verbose Object type.

🔗 See this Markdown example

Screenshot

Screenshot 2024-01-16 at 17 47 56

@rezrah rezrah requested a review from a team as a code owner January 16, 2024 15:17
@rezrah rezrah requested a review from auareyou January 16, 2024 15:20
Copy link

@auareyou auareyou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rezrah rezrah merged commit bbd1b6a into main Jan 17, 2024
4 checks passed
@primer-css primer-css mentioned this pull request Jan 17, 2024
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.

3 participants