Ipsum

Migrate from Jekyll

Move static content to static Jekyll has a rule that any directory not starting with _ will be copied as-is to the _site output. Hugo keeps all static content under static. You should therefore move it all there. With Jekyll, something that looked like ▾ <root>/ ▾ images/ logo.png should become ▾ <root>/ ▾ static/ ▾ images/ logo.png Additionally, you’ll want any files that should reside at the root (such as CNAME) to be moved to static. Create your Hugo configuration file Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the Hugo configuration documentation for details. Set your configuration publish folder to _site The default is for Jekyll to publish to _site and for Hugo to publish to public. If, like me, you have _site mapped to a git submodule on the gh-pages branch, you’ll want to do one of two alternatives: Change your submodule to point to map gh-pages to public instead of _site (recommended). git submodule deinit _site git rm _site git submodule add -b gh-pages [email protected]:your-username/your-repo.git public Or, change the Hugo configuration to use _site instead of public. { .. "publishdir": "_site", .. } Convert Jekyll templates to Hugo templates That’s the bulk of the work right here.

Continue reading

Migrate from Jekyll

Move static content to static Jekyll has a rule that any directory not starting with _ will be copied as-is to the _site output. Hugo keeps all static content under static. You should therefore move it all there. With Jekyll, something that looked like ▾ <root>/ ▾ images/ logo.png should become ▾ <root>/ ▾ static/ ▾ images/ logo.png Additionally, you’ll want any files that should reside at the root (such as CNAME) to be moved to static. Create your Hugo configuration file Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the Hugo configuration documentation for details. Set your configuration publish folder to _site The default is for Jekyll to publish to _site and for Hugo to publish to public. If, like me, you have _site mapped to a git submodule on the gh-pages branch, you’ll want to do one of two alternatives: Change your submodule to point to map gh-pages to public instead of _site (recommended). git submodule deinit _site git rm _site git submodule add -b gh-pages [email protected]:your-username/your-repo.git public Or, change the Hugo configuration to use _site instead of public. { .. "publishdir": "_site", .. } Convert Jekyll templates to Hugo templates That’s the bulk of the work right here.

Continue reading