Simply put, I want social URLs to my blog. For example, when going to www.myWebsite.com/twitter, the user gets redirected to www.twitter.com/username.
I'm also wondering if it's possible to generate them from the theme templates, that'd be neat!
Simply put, I want social URLs to my blog. For example, when going to www.myWebsite.com/twitter, the user gets redirected to www.twitter.com/username.
I'm also wondering if it's possible to generate them from the theme templates, that'd be neat!
Yes, this is possible with Hugo. There are already ready-made Hugo themes that realize something like this. For example, the following Hugo theme: https://github.com/gcc42/hugo-redirect
Just put in a redirects section with a twitter.md file. The layout file for the redirect section should look like this:
<html>
<head>
<meta http-equiv="refresh" content="0; url={{ .Params.redirect }}">
</head>
<body></body>
</html>
And the twitter.md file should look like this:
---
title: Twitter
url: https://www.twitter.com/username
---