Running jekyll generated files without jekyll / local server?

前端 未结 3 688
無奈伤痛
無奈伤痛 2021-01-04 20:42

I have just started working with Jekyll. As a front-end developer i have to create a lot of static pages for web applications before they go into development.

I am t

3条回答
  •  情话喂你
    2021-01-04 21:06

    You can view a built Jekyll site without a server - but it needs an extra tool.

    Serve your Jekyll site as normal, and use wget to clone your served site in flat format. This will work on a linux system:

    • Serve the Jekyll site
    • Open a new terminal, create & move into a target directory
    • Run wget from this directory
    • Send the resulting directory to your client

    You may need to play about with wget settings, but if your site is served on port 4000 you could try something like this:

    wget --convert-links -r http://127.0.0.1:4000/
    

    You'll probably need to be careful with the recursive flag. See http://www.gnu.org/software/wget/

提交回复
热议问题