@kaushalmodi you have any idea maybe...? my "hugo" tag (as in the tag that is about hugo as a topic) doesn't work, all others do.

there's an index.html for the hugo tag in the tags directory just like for the other tags, but you get a 404 when you click it - sidebar or going there directly.

I'm not sure what is wrong, since the page is actually there, and the link to it is correct... this is odd.


@kaushalmodi @unklebonehead

I'm pretty sure I know what the problem is. On github, I'm missing the hugo.html tag page, which exists on my computer.

I'm not sure why, or how git can "ignore" this file, but that's that...

Since I have many sync conflict /html.backup files from all the restorations I've been doing, and also many directories and files that no longer lead anywhere, I think it's a good idea to just *delete* the entire doc folder and have hugo rebuild it... (what can go wrong, right?)

@unklebonehead @kaushalmodi

god no... last time I messed with git and my repos I took a week haha..

Anyway, here's my problem. Here's my gitignore:


...see anything very OBVIOUS? duh!

I've done it myself I believe to prevent github from getting the git program which has a copy in my site dir. It's not the one I use anymore so I can safely kill it. Remains of the past...

A few more minutes and this should be done.



I hate to reiterate this again, but there's very little need to generate the HTML files using and commit them to git :)

Using services like , you just commit and push the Markdown files, your Hugo layout files, etc to your git remote (GitHub is supported). Netlify gets triggered on each git push automatically, it picks up the Hugo site source files, runs hugo on its server and deploys the HTML files.

@kaushalmodi OK, but in this case it wouldn't fix the problem, right... since the issue was that git didn't even push the html file to github?


> since the issue was that git didn't even push the html file to github?

Netlify would prevent issues exactly like those.

You do not need to run Hugo locally at all!

Just update your Org files, export using ox-hugo and commit the new/updated Markdown files. That's it!

Netlify then runs Hugo on its server, and deploys the generated HTML files.

You will not need the "forgot to rebuild Hugo" commits anymore :)

@kaushalmodi ok then I don't get it.

my understanding is basically that you have this workflow:

ox-hugo > hugo > git > github docs

and with netifly,

ox-hugo > hugo > git > github > netifly

Since netifly counts on github (with provided permissions) to get your updates, which in turn come from your local git...

so if that's true, how will netifly not have the issue I just had? I guess I don't understand how it works 100%.



Let me break this down:


ox-hugo > hugo > git > github docs

Me: edit Org files
Me: export to Markdown
Me: rememver to run Hugo
Me: remember to commit all HTML files
Me: commit to git and push to GitHub
Github: copy/paste the public dir to the deployment area



But with Netlify

ox-hugo > hugo > git > github > Netlify

Me: edit Org files
Me: export to Markdown
Me: commit to git and push to GitHub
Netlify: runs Hugo
Netlify: copy/pastes the public/ dir that it created on its server to the deployment area


In other words, gitignore the entire public/ directory if you are using Netlify.

You can still run Hugo locally to check things and piece of mind, but you do not need to commit any generated HTML file.

At one point, you'll just edit the Org files, export and commit the Markdown files without even running the Hugo server locally 😎

@kaushalmodi ok so from what you're saying, netifly picks up on my org file directly? from ox-hugo? (which is also on github).

So netifly "understands" org-mode and ox-hugo? and skips the whole html creation part?


> So netifly "understands" org-mode and ox-hugo?

No, not exactly, see my earlier toots.

But it *can be made to understand Org mode*; I commit just the Org mode files to git for the ox-hugo doc site and then the export using ox-hugo plus Hugo run happen on Netlify. But that's a different topic altogether.

@kaushalmodi I read the parts your wrote, here's something I don't get:

you commit the changes from org to git, but do not build the site (with hugo), because netfly does it for you...

but how...? netifly doesn't understand org-mode, and there are no html files (because you didn't built with hugo), so how does it know?

is it because it grabs the .md files from your content folder in hugo instead?


> is it because it grabs the .md files from your content folder in hugo instead?

Exactly. That's why I mentioned that you do need to commit all Hugo site source files (Markdown content and the layout and theme dirs).

Basically, commit only the bare minimum things that you can git clone and successfully run Hugo with.


Also, technically you don't need to commit the Org files either. But one should commit those to git too for the sake of backup and file history.

@kaushalmodi another possibly adventage to netifly that I can think of then, because it skips the html and the whole doc folder:

It keeps things more current. For example, I wouldn't have 20 or so dead tag pages because the just left behind after I changed my tags.

Ok this is becoming more appealing now.

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!