diff --git a/defaults/disroot.yml b/defaults/disroot.yml index 29be520..9d2a4f9 100644 --- a/defaults/disroot.yml +++ b/defaults/disroot.yml @@ -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' diff --git a/defaults/main.yml b/defaults/main.yml index bc505d3..84f7cd5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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: diff --git a/tasks/sub_repos.yml b/tasks/sub_repos.yml index 0e4af2d..8d3a499 100644 --- a/tasks/sub_repos.yml +++ b/tasks/sub_repos.yml @@ -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 }}" diff --git a/tasks/website_repos.yml b/tasks/website_repos.yml index 58b44e4..e70c863 100644 --- a/tasks/website_repos.yml +++ b/tasks/website_repos.yml @@ -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 }}"