Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Wishlist
  3. Hugo CMS

Hugo CMS

Scheduled Pinned Locked Moved App Wishlist
28 Posts 11 Posters 4.4k Views 12 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • fbartelsF fbartels

    thanks @nebulon. Not quite sure if it would help in my case, since the page is rebuilt in a clean environment each time, so while the content may be the same, at least timestamps will have changed.

    nebulonN Offline
    nebulonN Offline
    nebulon
    Staff
    wrote on last edited by
    #18

    @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

    fbartelsF 1 Reply Last reply
    0
    • nebulonN nebulon

      @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

      fbartelsF Offline
      fbartelsF Offline
      fbartels
      App Dev
      wrote on last edited by
      #19

      @nebulon I noticed that in newer surfer version you added some parallelization for put requests. Upgrading surfer to the lastest version brought the deployment time down to four minutes.

      1 Reply Last reply
      3
      • jdaviescoatesJ jdaviescoates

        @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? 🙂

        V Offline
        V Offline
        vjvanjungg
        wrote on last edited by
        #20

        @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. 😄

        doodlemania2D 1 Reply Last reply
        4
        • V vjvanjungg

          @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. 😄

          doodlemania2D Offline
          doodlemania2D Offline
          doodlemania2
          App Dev
          wrote on last edited by
          #21

          @vjvanjungg Very nicely done!

          1 Reply Last reply
          1
          • timconsidineT Offline
            timconsidineT Offline
            timconsidine
            App Dev
            wrote on last edited by timconsidine
            #22

            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.

            girishG 1 Reply Last reply
            0
            • timconsidineT timconsidine

              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.

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by girish
              #23

              @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)

              timconsidineT 1 Reply Last reply
              0
              • girishG girish

                @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)

                timconsidineT Offline
                timconsidineT Offline
                timconsidine
                App Dev
                wrote on last edited by
                #24

                @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.

                robiR girishG 2 Replies Last reply
                1
                • timconsidineT timconsidine

                  @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.

                  robiR Offline
                  robiR Offline
                  robi
                  wrote on last edited by
                  #25

                  @timconsidine are there not hugo web front ends that might help?

                  Conscious tech

                  1 Reply Last reply
                  0
                  • timconsidineT timconsidine

                    @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.

                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #26

                    @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.
                    robiR 1 Reply Last reply
                    2
                    • girishG girish

                      @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.
                      robiR Offline
                      robiR Offline
                      robi
                      wrote on last edited by
                      #27

                      And you can mount Surfer app remotely via webdav!

                      Conscious tech

                      1 Reply Last reply
                      1
                      • timconsidineT Offline
                        timconsidineT Offline
                        timconsidine
                        App Dev
                        wrote on last edited by
                        #28

                        @girish thank you, I have taken a very similar but slightly different approach :

                        • taken cloudron surfer as base app
                        • tweaked Dockerfile to install hugo (into /app/data as suggested)
                        • added a deploy.sh script for manual publishing (not via cron)

                        Installed it as a custom app.
                        Works nicely (as of course it should)
                        Need to tidy it up before publishing a repo.

                        So now I have Hugo bundled with Surfer, so all coding & building can be done within the container/app deployment.
                        No need for CI/CD, and no need for git commits / push / fetch etc.
                        Just open up the terminal from the app's settings panel.
                        Single 'source of truth' accessible from any device.

                        It might be a niche use case, but if someone really wants hugo deployed on Cloudron, it's available.

                        1 Reply Last reply
                        4
                        • chetbakerC chetbaker referenced this topic on
                        • jadudmJ jadudm referenced this topic on
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Bookmarks
                        • Search