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

前端 未结 8 503
萌比男神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 10:00

    Jekyll has gone through some major updates in the past few months, so maybe this wasn't possible when this question was originally posted...

    Jekyll supports a permalink attribute in the YAML front-matter section of your blog posts. You can specify the URL that you would like your post to have and Jekyll will use that (instead of the filename) when generating your site.

    ---
    title: My special blog post
    permalink: /programovani/2010/04/git-co-to-je-a-co-s-tim
    ---
    My blog post markdown content
    

提交回复
热议问题