Site root: Github Pages vs. `jekyll --server`

后端 未结 5 753
走了就别回头了
走了就别回头了 2020-12-24 08:20

When I run jekyll --server my site is available at http://localhost:4000/, but when I deploy to GitHub Project Pages, it\'s available at http

5条回答
  •  青春惊慌失措
    2020-12-24 08:59

    Since --url in command line has been deprecated there is another solution.

    Let's say your URL path is repo in you http://name.github.io/repo. Now in all links use absolute URLs like

    
    

    Or links

    License
    

    All you need now is to add --baseurl to command line when you run it locally.

    jekyll --server --baseurl /repo/
    

提交回复
热议问题