deprecated-packages / pehapkari.cz-old

Website of Czech and Slovak PHP Community
https://pehapkari.cz
31 stars 85 forks source link

Redirection after change post slug #192

Closed leninzprahy closed 7 years ago

leninzprahy commented 7 years ago

It would be nice to have some table of renamed slug, and redirect to new one.

For example, the old one: https://pehapkari.cz/blog/2017/01/20/jak-snadne-a-rychle-upravovat-soubory-ve-vendoru redirect to new one: https://pehapkari.cz/blog/2017/01/20/jak-snadno-a-rychle-upravovat-soubory-ve-vendoru

TomasVotruba commented 7 years ago

It came to my mind too. Do you have some idea?

There could be some _config/redirect.neon file:

old: new

Or better - config section redirects:

configuration:
    redirects:
        old: new

With generated static content using meta tag:

https://raw.githubusercontent.com/TomasVotruba/tomasvotruba.cz/master/source/_posts/2016/2016-08-15-podcast-o-php-a-sebevzdelavani.md

What do you think?

leninzprahy commented 7 years ago

I'm not sure, because I don’t know how the "statie" exactly works. I like the idea with the meta tags, and you may not need to generate it automatically. Just whenever You renames slug, you leave there the original file with the original slug to redirect.

TomasVotruba commented 7 years ago

After considering, metatags is the best solution so far.

I will add fix for that issue.

TomasVotruba commented 7 years ago

It works :)