Search code examples
configurationjekyllgithub-pagessymlinkhugo

Keep Github Pages and Hugo output in same directory?


I recently decided to generate a Github Pages website using Hugo. I wanted to keep Hugo input (configuration, themes) in the same directory as the output, for easy management. Unfortunately, Github Pages's CI complains when I try to turn public directory into a symlink into ., as well as when I create a hugo directory and make hugo/public a symlink to ... Are there any other options to keep configs and output in the same directory, bypassing that error?


Solution

  • I solved the problem by putting the following in my config.toml file:

    publishDir = "."
    

    As a result, I didn't need the "public" directory pointing to ..