fix when pages/theme files are not set as disroot

This commit is contained in:
meaz 2023-08-13 09:17:30 +02:00
parent 4961f586a4
commit 25feb56126
Signed by: meaz
GPG Key ID: CD7A47B2F1ED43B4
4 changed files with 15 additions and 8 deletions

View File

@ -18,6 +18,7 @@ grav_website_repo:
- name: language-selector
config: 'true'
site_name: "Disroot"
pages_folder: ""
theme_name: "disroot"
- site_hostname: howto.disroot.lan
repo: 'https://git.disroot.org/Disroot/Howto.git'
@ -31,19 +32,23 @@ grav_website_repo:
config: 'true'
- name: tagcloud
site_name: "Disroot Howto"
pages_folder: ""
theme_name: "grav-theme-howto"
grav_website_theme:
- site_hostname: disroot.lan
theme_name: disroot
folder_name: theme
subfolder_path: ""
repo: 'https://git.disroot.org/Disroot-themes/grav-theme-disroot.git'
- site_hostname: howto.disroot.lan
theme_name: grav-theme-howto
folder_name: theme
subfolder_path: ""
repo: 'https://git.disroot.org/Disroot-themes/grav-theme-howto.git'
- site_hostname: disroot.lan
theme_name: disrootblog
subfolder_path: ""
folder_name: blogtheme
repo: 'https://git.disroot.org/Disroot-themes/grav-theme-disrootblog.git'

View File

@ -20,7 +20,7 @@ grav_download_url: 'https://github.com/getgrav/grav/releases/download/{{ grav_v
## repo: the url of your git repo.
## modules: list of modules you want to install with gpm. If no modules is to be set, add [], otherwise it throws an error
grav_modules_already_installed: 'false' # set to true after 1st installation
grav_modules_already_installed: 'false' # set to true after 1st installation so that it doesn't install plugins again
# If you have a git repo with your pages you can set it with the following:
grav_website_repo:
@ -31,19 +31,21 @@ grav_website_repo:
- name: language-selector
config: 'true'
site_name: "My Website"
pages_folder: "pages" # keep that empty if your repo files are in the `pages` folder. Otherwise, set it to `pages`.
theme_name: quark # the default is quark
# If you have a repo with a theme you can set it with the following:
grav_website_theme:
# - site_hostname:
# folder_name:
# theme_name:
# repo:
# - site_hostname: # the name of your website's hostname
# folder_name: # the name you want to give to the git cloned folder
# subfolder_path: # path to the folder that holds the files on your repo, if there aren't inyour repo's root. Set it as empty if your files are in root.
# theme_name: # the name you want to give to the theme
# repo: # the website repo
# If you have other repos, for exemple specific pages, you can set those with the following:
grav_website_specific_pages:
# - site_hostname:
# folder_name:
# folder_name:
# repo:
# symlink_from_path:
# symlink_to_path:

View File

@ -19,7 +19,7 @@
- name: "[Sub Repos] - Symlink theme path"
file:
src: "{{ grav_path }}/{{ item.site_hostname }}/{{ item.site_hostname }}-{{ item.folder_name }}"
src: "{{ grav_path }}/{{ item.site_hostname }}/{{ item.site_hostname }}-{{ item.folder_name }}{{ item.subfolder_path }}"
dest: "{{ grav_path }}/{{ item.site_hostname }}/site/user/themes/{{ item.theme_name }}"
state: link
owner: "{{ grav_user }}"

View File

@ -24,7 +24,7 @@
- name: "[Repos] - Git clone Website repos"
git:
repo: "{{ item.repo }}"
dest: "{{ grav_path }}/{{ item.site_hostname }}/{{ item.site_hostname }}-pages"
dest: "{{ grav_path }}/{{ item.site_hostname }}/{{ item.site_hostname }}-pages/{{ item.pages_folder }}"
force: yes
become: yes
become_user: "{{ grav_user }}"