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

Meta tags for each option header #10

Open
granny opened this issue Apr 26, 2021 · 2 comments
Open

Meta tags for each option header #10

granny opened this issue Apr 26, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@granny
Copy link
Member

granny commented Apr 26, 2021

Since you cannot assign meta tags based on URI fragments, create a custom page for each option that redirects you to the location of that option in the Configuration page.

Using the verbose option as an example from the docs,

https://purpurmc.org/docs/Configuration/#verbose
would be the original link to the option, and

https://purpurmc.org/docs/Configuration/verbose
would be used for meta tags that describe the option whilst also redirecting you to the original link when opened. The hyperlink 🔗 icon next to the option name would use window.history.pushState to replace the link in the address bar with the new page whilst also keeping the "jumping to header" functionality using Element#scrollIntoView() to encourage usage of this new feature.

The only reason I want this functionality is so that posting a link to the option will display an embed in discord with the information on that option. It's a lot of work for minimal gain, which is why I don't see this happening anytime soon.

@granny granny added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Apr 26, 2021
@granny
Copy link
Member Author

granny commented Mar 27, 2023

completed back in august 7, 2022 by redirecting you from /docs/configuration/([\w\.\-]*)/?$ to /configredirect.php?option=$1 using nginx's configuration.

commit that adds configredirect.php to PurpurWebsite: PurpurMC/PurpurWebsite@0f507fe

nginx configuration:

# Purpurdoc
location ~ /docs {
    index index.html;

    location ~ /docs/configuration/([\w\.\-]*)/?$ {
        try_files $uri /configredirect.php?option=$1;
    }
}

@granny granny closed this as completed Mar 27, 2023
@granny
Copy link
Member Author

granny commented Mar 27, 2023

wait i'm sleep deprived - this only does the path for the config options & doesn't set the meta tags for each option

@granny granny reopened this Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant