Move blog to separate repository
From https://gitlab.com/gitlab-com/www-gitlab-com/issues/1265#note_42447351, here's the status:
https://gitlab.com/gitlab-com/blog contains a stripped down (and slightly stale) version of www-gitlab-com repository with mostly just the blog. Here's what we need to do:
-
Make all URLs linked to use the /blog
prefix.What I've tried: middleman-blog has a
prefix
configuration, and Middleman has a:http_prefix
configuration value. It seems that if we set theprefix
in the middleman-blog, we have to move everything insources/
into thesources/blog
directory. middleman-blog then generates everything in thepublic/blog
directory.However, all helper functions (e.g.
javascript_include_tag
) used by Middleman won't know to use the/blog
prefix, and hence JavaScript assets will be pointing to/javascripts/
, for example. If you sethttp_prefix
, the JavaScript paths correctly use/blog/javascripts
, but you end up getting a double/blog/blog/2017
for blog entries.We might be able to fix this by setting
:css_dir
,:js_dir
, and:images_dir
independently for Middleman: http://willschenk.com/building-sites-with-middleman/ -
Add a redirection rule in the NGINX about.gitlab.com configuration to migrate /20xx/
->/blog/20xx
. -
rsync or copy new blog posts/images from www-gitlab-com into the new repository. -
Fix the .gitlab-ci.yml
on both repositories to deploy to different internal paths (e.g.blog-public
andwww-public
). -
Adjust the about.gitlab.com NGINX configuration to point /blog
toblog-public
, and everything else towww-public
dir. -
Adjust the about.gitlab.com configuration to work with Review Apps. -
Optional: Run git filter-branch
or some sort to rewrite history to trim down the repository size.
I could use some help with this. @axil, @rspeicher, perhaps you could lend a hand?