I want to create a homepage and, for now, I think Github\'s pages features will serve my needs. However, I might want to switch to a more full-blown CMS/blog engine later on.
Mass redirect layout technique
Individual page redirects are covered at: https://stackoverflow.com/a/36846720/895245 Actual 301s seem impossible.
If you want to mass redirect:
http://you.github.io/some/path
to:
http://new_domain.com/some/path
do as follows.
Before you move away
_layouts/default.html
: the default layout
_config
uses the default layout:
defaults:
-
scope:
path: ''
values:
layout: 'default'
After you move away
create _layouts/redirect.html
with an HTML redirect derived from Redirect from an HTML page along:
{% assign redir_to = site.new_domain | append: page.url %}
Redirecting...
Redirecting...
Click here if you are not redirected.
_config
contains:
defaults:
-
scope:
path: ''
values:
layout: 'redirect'
new_domain: 'http://new-domain.com/some/path
replace every non-default layout with a symlink to the redirect
layout. This is the only ugly part of this technique. I don't see a beautiful non-plugin solution.