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. Grav CMS
  3. Theme development workflow ?

Theme development workflow ?

Scheduled Pinned Locked Moved Grav CMS
3 Posts 2 Posters 313 Views 2 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.
  • M Offline
    M Offline
    mononym
    wrote on last edited by mononym
    #1

    Hello.

    TL;DR How can I seamlessly code and preview a grav theme?

    I started by coding a grav theme using only the app's file manager! This was quite adventurous.

    To "simplify" things, I bundled my modest work into a git repository. I followed the outline of the grav theme file structure because I thought the theme could be added to the grav package manager.

    Unfortunately, due to some setup, grav devs only add themes to the package manager if they are hosted on GitHub 😞

    So now I'm looking for a way to work on the repo while easily previewing the theme.

    1. Is it possible to update a manually installed theme other than by replacing the files in the theme directory?
    2. Is it possible to view a grav site locally, like Hugo etc. ?
    3. The grav-git-sync plugin synchronizes the user directory containing the theme. But in that case, the repository does not correspond to an installable theme package.
      • If you synchronize a grav site with git-sync (user/theme folder) where the theme was manually installed, the theme seems to be a git submodule. But changes in the submodule don't seem to be picked up by the git-sync plugin.
    4. Is it possible/recommended to use git within the App Terminal? To manually pull the changes into the theme directory.
      • When browsing to the theme in the terminal /app/code/user/themes/doric and executing sudo -u www-data git fetch I get git@codeberg.org: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.. But the same operation works in the official /app/code/user/themes/quark theme. (origin URL has to be the https address of the repo).
    5. Bonus: Wouldn't a web IDE be particularly useful in this case?

    Thanks for sharing your thoughts or workflow!

    1 Reply Last reply
    0
    • J Offline
      J Offline
      joseph
      Staff
      wrote on last edited by
      #2

      Since you got no.4 working, is that not what you want? git pull will replace the files in the theme directory (1) . Don't know about grav specific stuff though.

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mononym
        wrote on last edited by
        #3

        Yes indeed, that's how I proceeded in the end. It worked fairly well.

        BTW, I just came across the remote development feature of the Zed editor (https://zed.dev/docs/remote-development). Don't know if that could work in an app/code/ directory but if, it will make coding Grav easier.

        1 Reply Last reply
        0
        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