Hugo CMS
-
Exactly. I’m struggling to think of a way to package Hugo where it wouldn’t just end up being GitHub pages or a lamp app where people manually upload their generated site.
-
My blog (served through the surfer app) is built with Hugo. I was briefly looking at modifying the Github pages app, but for me it was a bit strange that I then would also need to store the source repo for the homepage inside of the app (I already have Gitea for this).
I have now setup a ci flow with Drone (managing app running on Cloudron as well, agents running elsewhere). Only downside is that the surfer cli is quite slow for lots of small files, uploading my page currently takes 15 minutes.
-
@robi yes, that is also how I am publishing another static app (Homer), but that would require breaking up the deploy process into individual commands (as opposed to the simple
surfer put --token $SURFTOKEN --server blog.9wd.eu public/. /
. -
@atrilahiji said in Hugo CMS:
“document the problem away”
Yes, I think this is probably the answer. If there was a good step by step guide for beginners as to how to get started with this static site stuff then people could just do it.
What I want is a nice self-hosted documentation site that people can "click to edit this page on GitLab/ Gitea/ Gogs" like lots of people already do GitHub pages and Github. or with Gitbook.
The impression I get is that this really shouldn't be that hard to do using Surfer together with one of the Git apps on Cloudron (and/ or GitHub Pages), but I'm still not really sure where to start
Perhaps I should spend less time on this forum and more time reading up about it all! Then I could help write the guide! that might happen eventually!
-
@fbartels That is indeed true, I was thinking of adding checksum tests though, but for now the sync already helps to purge files on the remote end, which don't exist anymore in a new build. Of course if the pipeline is used to build artifacts or packages, then the old
surfer put
should be used to not purge the old ones -
@jdaviescoates check out my new guide https://forum.cloudron.io/topic/4042/beginner-s-guide-hugo-gitlab-ci-surfer hope it helps you get up and running.
-
@vjvanjungg Very nicely done!
-
Sorry to revisit this old topic
Fully appreciate about static site generators building locally and push-publishing remotely.But there’s an element to the discussion missing. In my case, I don’t want to be building locally. Then I am tied to a specific local device. It may not be to hand (and maybe too lazy to levitate posterior from sofa).
Yes, I could sync local configs between devices, but that’s not always smooth.
I would prefer to use a cloud resource to build and publish. If I am working in the terminal locally, no different to working in terminal remotely.
Yes, I could setup a remote deployment of a Linux desktop, use that to build and publish to eg Surfer. But why the duplication ? Seems more elegant and contained to be able to do it in one place.I know this is contrary to the CI/CD bandwagon. But I see a lot of advantages, principally avoiding multiple component pieces.
-
@timconsidine afaik, hugo is a CLI tool. One has to write a web application that you ask for - something which accepts git pushes or accepts uploads or monitors some git repo etc and then builds via hugo.
To be fair, this is what we did with GitHub Pages app . It runs jekyll and accepts git pushes (but only via http)
-
@girish hugo is CLI for building and outputting the built files.
Totally happy with building the site pages in terminal, rendering them in Hugo, using webserver to serve.
I just want to do it all in one container, without CI/CD, cloning repos, pushing files.
Maybe I will try a custom image based on Surfer. -
@timconsidine are there not hugo web front ends that might help?
-
@timconsidine Depending on your use case:
- Install surfer
- Install hugo into /app/data of surfer - https://gohugo.io/installation/linux/
- Then, setup a cron script via https://docs.cloudron.io/apps/#cron . That cron script periodically checks for changes in upstream, builds it locally and copies over to the surfer directory.