Skip to content

Commit

Permalink
feat: Add CMS settings
Browse files Browse the repository at this point in the history
  • Loading branch information
delisma committed Jun 4, 2024
1 parent 40c46bb commit b29e88a
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ Temporary Items
# Jekyll
.jekyll-cache
_site
vendor
vendor
Gemifile
Gemfile.lock
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
source "https://rubygems.org"

gem "jekyll-seo-tag"
gem "jekyll-remote-theme", github: "benbalter/jekyll-remote-theme", branch: "master"
gem "jekyll-remote-theme", github: "benbalter/jekyll-remote-theme", branch: "master"
gem "sass-embedded", "~> 1.60.0" # Specify a version compatible and available
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ DEPENDENCIES
jekyll-seo-tag

BUNDLED WITH
2.3.9
2.3.9
17 changes: 14 additions & 3 deletions _includes/resources-inc/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,20 @@
<script src="{{ setting-resourcesBasePathTheme }}/js/theme{{ setting-minifiedSuffix }}.js"></script>
{%- if page.script.first -%}
{%- for js in page.script -%}
<script src="{{ js }}"></script>
<script src="{{ js }}"></script>
{%- endfor -%}
{%- elsif page.script -%}
<script src="{{ page.script }}"></script>
<script src="{{ page.script }}"></script>
{%- endif -%}
{% if site.analytics.adobe %}{% include /providers/adobefooter.html %}{% endif %}
{% if site.analytics.adobe %}{% include /providers/adobefooter.html %}{% endif %}
<script>
if (window.netlifyIdentity) {
window.netlifyIdentity.on("init", (user) => {
if (!user) {
window.netlifyIdentity.on("login", () => {
document.location.href = "/admin/";
});
}
});
}
</script>
17 changes: 17 additions & 0 deletions _includes/resources-inc/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<link href="{{ setting-resourcesBasePathTheme }}/assets/favicon.ico" rel="icon" type="image/x-icon" />
<link rel="stylesheet" href="{{ setting-resourcesBasePathTheme }}/css/theme{{ setting-minifiedSuffix }}.css" />
<noscript>
<link rel="stylesheet" href="{{ setting-resourcesBasePathWetboew }}/css/noscript{{ setting-minifiedSuffix }}.css" />
</noscript>
{%- if page.css.first -%}
{%- for sheet in page.css -%}
{%- if sheet.first -%}
<link rel="stylesheet" href="{{ sheet.href }}" integrity="{{ sheet.integrity }}" crossorigin="anonymous" />
{%- elsif sheet -%}
<link rel="stylesheet" href="{{ sheet }}" />
{%- endif -%}
{%- endfor -%}
{%- elsif page.css -%}
<link rel="stylesheet" href="{{ page.css }}" />
{%- endif -%}
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
14 changes: 7 additions & 7 deletions _layouts/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
{%- endcapture -%}
<!DOCTYPE html>
<html class="no-js" lang="{{ page.language | default: 'en' }}" dir="{{ i18nText-langDir | default: 'ltr' }}">
<head>
<meta charset="utf-8">
<head>
<meta charset="utf-8">
{% include license.html %}
<title>{{ page-title }} | {{ site.title[ page.language ] }}</title>
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>{{ page-title }} | {{ site.title[ page.language ] }}</title>
<meta content="width=device-width, initial-scale=1" name="viewport">
{% include metadata.html %}
{% include resources-inc/head.html %}
{% include analytics.html %}
</head>
<body {% if page.pageclass %}class="{{ page.pageclass }}" {% endif %}vocab="http://schema.org/" typeof="WebPage">
</head>
<body {% if page.pageclass %}class="{{ page.pageclass }}" {% endif %}vocab="http://schema.org/" typeof="WebPage">
{%- if page.archived -%}
{% include headers-includes/archive.html %}
{%- endif -%}
Expand All @@ -26,5 +26,5 @@
{{ content }}
{% include footers/footer.html %}
{% include resources-inc/footer.html %}
</body>
</body>
</html>
23 changes: 23 additions & 0 deletions en/admin/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
backend:
name: git-gateway
branch: content # Branch to update (optional; defaults to master)
# This line should *not* be indented
media_folder: "images/uploads" # Media files will be stored in the repo under images/uploads

collections:
- name: "blog" # Used in routes, e.g., /admin/collections/blog
label: "Blog" # Used in the UI
folder: "_posts" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{year}}/{{month}}/{{day}}/{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- { label: "Alternate language page url", name: "altLangPage", widget: "string" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Description", name: "description", widget: "string" }
- { label: "Featured Image", name: "thumbnail", widget: "image" }
- { label: "Body", name: "body", widget: "markdown" }

logo_url: https://wet-boew.github.io/themes-dist/GCWeb/GCWeb/assets/sig-blk-en.svg
publish_mode: editorial_workflow
site_url: https://blog.canada.ca
14 changes: 14 additions & 0 deletions en/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" />
<title>Canada.ca Design System Content Manager</title>
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
</head>
<body>
<!-- Include the script that builds the page and powers Decap CMS -->
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
</body>
</html>

0 comments on commit b29e88a

Please sign in to comment.