Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

README.md showing as index file in github page [hugo blog engine deployment]

*Heading a issue while rendering posts as static pages hosted in github ... What I am willing to complete is a personal blog environment with Hugo! By so far I have run the site locally and went well...but while deploying in Github the only thing I get when I visit the site is

Blockquote

README.md rendered as index page on :https://passager07.github.io/ I am not making it to access the ...content/post/[post].md

Blockquote

https://github.com/passager07/passager07.github.io

like image 437
Tahirllari Aldo Avatar asked Sep 19 '25 17:09

Tahirllari Aldo


2 Answers

Solution of this problem was found by :

  1. Constructing my new repository without Readme.md file and licence.

  2. Playing around on localhost with hugo and all the configuration (including theme) to get the greatest satisfaction!

  3. Making sure that public folder is created running hugo
  4. Getting a .gitingore file on public folder
  5. Pushing it to my repository on master branch

After this steps I let https://www.netlify.com do the rest by automatic deployment!

like image 158
Tahirllari Aldo Avatar answered Sep 23 '25 10:09

Tahirllari Aldo


Hugo is for generating a static html pages: that measn you need your GutHub page space to points to those generated html pages, not md files.

You can generate those html pages in a docs folder (since August 2016) or in a gh-pages branch.

See more at "Hugo: Hosting on GitHub Pages", which uses for instance a config.toml with:

publishDir: "docs"

After running hugo, push your master branch to the remote repo and choose the docs folder as the website source of your repo.

like image 33
VonC Avatar answered Sep 23 '25 12:09

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!