Issue with deployment

I.m not sure what I did wrong here. I had my site deployed using netlify and it was working, and it still does in local host 1313.When I made the changes in github and pulled up the site it was not working properly. I copied the files in another github repo and it still is not working as it should. It has to do with the index.html page. It should range over the pages and have it displayed as links in the index page. This is my original repo My_new_site This one is back as it was originally. Here is the actual website
This one is the new repo Hugo_adventureThe differences are in the layout/index.html file and the content file. If y’all could take a look and tell me what you see. I am not seeing any problems or any differences in my file on my computer. Thanks

Your posts have draft set to true

yet another duh on my part! I knew it was something simple that I was missing. Thanks again zwbetz… works as expected now. On to the next problem.

should I set draft as false in all my .md files in the program on my computer? What is best practice for that one?

I’m confused what you’re asking

I believe what you’re asking is if you should set draft: false in you archetypes files. That works like a charm for me. Once I do that, I never have to hit that bug :ant: again. So yeah, go for it.

Please note that this is not a bug. This is the intended behavior and is documented here: Basic usage | Hugo

That really depends on you. The idea here of draft being set to true is that sometimes you might write some content that is not necessarily ready to get “out into the wild” just yet.

Scenario 1: Working as part of a team. Person 1 writes Part 1, Person 2 writes Part 2, Person 3 proof-reads the whole piece and approves it (or not). In this case, this piece of content needs to have draft set to true until Person 3 is happy with it and approves it.

Scenario 2: Writing in multiple sessions. You are working from home, writing an article, but you realize you left some of your notes at the office. So you use placeholders for some of the details. Save, commit., push. The next day, back at your office computer, you pull in the changes you made, update the placeholders with the actual details, and you’re good to go.

So, circling back, if you are happy to publish content as you go, then by all means set draft:false everywhere (including in the archetypes as suggested above) and you never have to worry about it.

Main thing is to remember to set draft to false when you are ready to publish. I’m still new to all this so this is all part of the learning curve, I hope :wink:

I didn’t mean it’s a bug in the sense you’d think. I was referring to the situation that lots of folks seem to run into over and over again … lol. I understand the utility of draft: true as the default. That said, I have found not that utility being something I need in most of my projects.

Besides, in most of the cases, most people publish a bunch of pages all at once when setting up a project. Drafts become a thing when you’re publishing new articles, docs’ page …

So it makes sense to set that value to false until it’s deemed necessary.

I only include draft in an archetype if it would ever need to be unpublished but saved somewhere in the site. Think about it: if your post wasn’t in the content directory, the front matter wouldn’t come into play.

So ask yerself: do I store unpublished content in my site? If so, maybe keep draft: true. If not (say, you write elsewhere and just need to publish), draft: false or omit draft from front matter. You can always add draft: true to any piece of content later. :slight_smile:

1 Like