What is the best approach for redirection of old pages in Jekyll and GitHub Pages?

前端 未结 8 522
萌比男神i
萌比男神i 2020-12-07 09:38

I have blog on github pages - jekyll

What is the best way to solve url strategy migration?

I found the best practice in common is create htaccess like so

8条回答
  •  隐瞒了意图╮
    2020-12-07 09:47

    The best option is to avoid url changes altogether by setting the permalink format in _config.yml to match your old blog.

    Beyond that, the most complete solution is generating redirect pages, but isn't necessarily worth the effort. I ended up simply making my 404 page a bit friendlier, with javascript to guess the correct new url. It doesn't do anything for search, but actual users can get to the page they were looking for and there's no legacy stuff to support in the rest of the code.

    http://tqcblog.com/2012/11/14/custom-404-page-for-a-github-pages-jekyll-blog/

提交回复
热议问题