diff --git a/templates/user/config/site.yaml.j2 b/files/disroot.site.yaml similarity index 84% rename from templates/user/config/site.yaml.j2 rename to files/disroot.site.yaml index b410058..e89bce5 100644 --- a/templates/user/config/site.yaml.j2 +++ b/files/disroot.site.yaml @@ -1,4 +1,4 @@ -title: {{ item.site_name }} +title: Disroot.lan default_lang: en author: name: Disroot diff --git a/templates/user/config/system.yaml.j2 b/files/disroot.system.yaml similarity index 98% rename from templates/user/config/system.yaml.j2 rename to files/disroot.system.yaml index 4a5c17a..af1ae15 100644 --- a/templates/user/config/system.yaml.j2 +++ b/files/disroot.system.yaml @@ -29,7 +29,7 @@ home: hide_in_urls: false pages: - theme: {{ item.theme_name }} + theme: disroot order: by: default dir: asc diff --git a/files/howto.site.yaml b/files/howto.site.yaml new file mode 100644 index 0000000..b70c87d --- /dev/null +++ b/files/howto.site.yaml @@ -0,0 +1,18 @@ +title: 'Howto Disroot' +default_lang: en +author: + name: 'Disroot Team' + email: info@disroot.org +taxonomies: + - category + - tag +metadata: + description: 'Howtos, tutorials to help you use services provided by disroot.org' +summary: + enabled: true + format: short + size: 300 + delimiter: '===' +blog: + route: /blog +acxtest: TEST \ No newline at end of file diff --git a/files/howto.system.yaml b/files/howto.system.yaml new file mode 100644 index 0000000..c53fcec --- /dev/null +++ b/files/howto.system.yaml @@ -0,0 +1,165 @@ +absolute_urls: false +param_sep: ':' +wrapped_site: false +reverse_proxy_setup: false +force_ssl: false +force_lowercase_urls: true +username_regex: '^[a-z0-9_-]{3,16}$' +pwd_regex: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}' +intl_enabled: true +languages: + supported: + - en + - pl + - es + - fr + - pt + - hu + - de + - ru + - it + - cs + include_default_lang: true + pages_fallback_only: false + translations: true + translations_fallback: true + session_store_active: true + http_accept_language: true + override_locale: false +home: + alias: /home + hide_in_urls: false +pages: + theme: 'grav-theme-howto' + order: + by: default + dir: asc + list: + count: 20 + dateformat: + short: 'jS M Y' + long: 'F jS \a\t g:ia' + publish_dates: true + process: + markdown: true + twig: false + twig_first: false + never_cache_twig: false + events: + page: true + twig: true + markdown: + extra: true + auto_line_breaks: false + auto_url_links: false + escape_markup: false + special_chars: + '>': gt + '<': lt + types: + - txt + - xml + - html + - htm + - json + - rss + - atom + expires: 604800 + last_modified: false + etag: false + vary_accept_encoding: false + redirect_default_route: false + redirect_default_code: '301' + redirect_trailing_slash: false + ignore_files: + - .DS_Store + ignore_folders: + - .git + - .idea + ignore_hidden: true + url_taxonomy_filters: true + frontmatter: + process_twig: false + ignore_fields: + - form + - forms +cache: + enabled: true + check: + method: file + driver: auto + prefix: g + purge_at: '0 4 * * *' + clear_at: '0 3 * * *' + clear_job_type: standard + clear_images_by_default: true + cli_compatibility: false + lifetime: 604800 + gzip: false + allow_webserver_gzip: false +twig: + cache: true + debug: true + auto_reload: true + autoescape: false + undefined_functions: true + undefined_filters: true + umask_fix: false +assets: + css_pipeline: false + css_pipeline_include_externals: true + css_pipeline_before_excludes: true + css_minify: true + css_minify_windows: false + css_rewrite: true + js_pipeline: false + js_pipeline_include_externals: true + js_pipeline_before_excludes: true + js_minify: true + enable_asset_timestamp: false + collections: + jquery: 'system://assets/jquery/jquery-2.x.min.js' +errors: + display: 0 + log: true +log: + handler: file + syslog: + facility: local6 +debugger: + enabled: false + shutdown: + close_connection: true + twig: true +images: + default_image_quality: 85 + cache_all: false + cache_perms: '0755' + debug: false + auto_fix_orientation: false + seofriendly: false +media: + enable_media_timestamp: false + auto_metadata_exif: false + upload_limit: 8388608 +session: + enabled: true + initialize: true + timeout: 1800 + name: grav-site + uniqueness: path + secure: false + httponly: true + split: true +gpm: + releases: stable + method: auto + verify_peer: true + official_gpm_only: true +accounts: + type: data + storage: file +strict_mode: + yaml_compat: true + twig_compat: true + blueprint_compat: true \ No newline at end of file diff --git a/tasks/configure.yml b/tasks/configure.yml index f103551..b76b8f9 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -1,13 +1,23 @@ --- - name: '[Config] - Deploy Grav system config file' - template: - src: 'user/config/system.yaml.j2' + copy: + src: '{{ item.system_file }}' dest: '{{ grav_path }}/{{ item.site_hostname }}/site/user/config/system.yaml' + owner: "{{ grav_user }}" + group: "{{ grav_group }}" + mode: 544 + when: item.system_file is defined loop: "{{ grav_website_repo }}" + tags: configure - name: '[Config] - Deploy Grav site config file' - template: - src: 'user/config/site.yaml.j2' + copy: + src: '{{ item.site_file }}' dest: '{{ grav_path }}/{{ item.site_hostname }}/site/user/config/site.yaml' + owner: "{{ grav_user }}" + group: "{{ grav_group }}" + mode: 544 + when: item.site_file is defined loop: "{{ grav_website_repo }}" + tags: configure diff --git a/tasks/main.yml b/tasks/main.yml index 9f4e934..2896bca 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,6 +8,9 @@ - name: "[GRAV] - Configure" include_tasks: configure.yml + when: item.system_file is defined or item.site_file is defined + loop: "{{ grav_website_repo }}" + tags: configure - name: "[GRAV] - Install modules" include_tasks: modules.yml