Tahirllari Aldo
Tahirllari Aldo

Reputation: 61

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

Upvotes: 4

Views: 4403

Answers (2)

Tahirllari Aldo
Tahirllari Aldo

Reputation: 61

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!

Upvotes: 2

VonC
VonC

Reputation: 1324617

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.

Upvotes: 1

Related Questions