Theme development workflow ?
-
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.
- Is it possible to update a manually installed theme other than by replacing the files in the theme directory?
- Is it possible to view a grav site locally, like Hugo etc. ?
- 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.
- 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(origin URL has to be the https address of the repo)./app/code/user/themes/doric
and executingsudo -u www-data git fetch
I getgit@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.
- Bonus: Wouldn't a web IDE be particularly useful in this case?
Thanks for sharing your thoughts or workflow!