Hugo CMS
-
@gdeflaux You can use hugo with surfer to deploy already.
- Follow the hugo quick start:
hugo new site quickstart cd quickstart git init git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke echo 'theme = "ananke"' >> config.toml hugo new posts/my-first-post.md hugo -D
- Then we just need to deploy public/ which contains the static pages. Install surfer on Cloudron. And then:
npm install -g cloudron-surfer surfer login surfer.example.com surfer put public/ /
That's it!
-
@girish this sounds/ looks really easy, but for someone like me I'm still not really sure how to do it.
Even though I've run Linux since before Ubuntu existed (and Ubuntu since it has), and I'm fairly familiar with using the command line for basic tasks, I still don't really feel at home there and have never really used git.
But I'd love to proper step-by-step guide to using things like Hugo, GitHub pages, mkDocs etc with Surfer on Cloudron.
I'm sure I could do it and would likely find it suprisingly and satisfyingly easy once I know how, but e.g. right now I'm not even sure where I'd type the above commands? On my local machine? after ssh-ing into my VPS? in a Cloudron web terminal? See what I mean?
-
It's all on your PC/mac. But yes, we should make a guide at some point in our docs for such content.
-
Hugo would be great but I do agree that static site generators are an odd ask given that surfer or GitHub pages steps to use Hugo could be used to, as I like to say, “document the problem away”
-
Yeah, I think if really want to package Hugo, it will need to essentially code a "workflow". Meaning, we can git push to the app or something (like GitHub pages app). Otherwise, there is nothing to package as such.
-
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.