diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..064581371d
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,37 @@
+// For format details, see https://aka.ms/devcontainer.json. For config options, see the
+// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
+{
+ "name": "Ruby",
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
+ "image": "mcr.microsoft.com/devcontainers/ruby:1-3.2-bullseye",
+ "features": {
+ "ghcr.io/devcontainers/features/python:1": {
+ "installTools": true,
+ "version": "3.11"
+ }
+ },
+
+ // Features to add to the dev container. More info: https://containers.dev/features.
+ // "features": {},
+
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
+ // not used as we are using --network=host, see below
+ // "forwardPorts": [
+ // // Jekyll Server
+ // 4000,
+ // // Live Reload Server
+ // 35729
+ // ],
+
+ // Use 'postCreateCommand' to run commands after the container is created.
+ "postCreateCommand": "bundle install --path=vendor/bundle",
+
+ // allow the container to talk to ports on the host
+ "runArgs": [ "--network=host" ]
+
+ // Configure tool-specific properties.
+ // "customizations": {},
+
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
+ // "remoteUser": "root"
+}
diff --git a/.github/ISSUE_TEMPLATE/bug_template.md b/.github/ISSUE_TEMPLATE/bug_template.md
new file mode 100644
index 0000000000..9aa3ee6a12
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_template.md
@@ -0,0 +1,40 @@
+---
+name: Bug Report
+about: Report a Bug
+title: ''
+labels: bug
+assignees: ''
+
+---
+
+
+
+### Summary
+
+
+
+### Steps to reproduce
+
+
+
+### What is the current *bug* behavior?
+
+
+
+### What is the expected *correct* behavior?
+
+
+
+### Relevant logs and/or screenshots
+
+
+
+### Possible fixes
+
+
diff --git a/.github/ISSUE_TEMPLATE/general_template.md b/.github/ISSUE_TEMPLATE/general_template.md
new file mode 100644
index 0000000000..f6b1446ead
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/general_template.md
@@ -0,0 +1,27 @@
+---
+name: General Issue
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+
+
+### Problem
+
+
+
+### Background Info
+
+
+
+### Proposed Solution
+
+
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000000..ab29a7e00f
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,25 @@
+### What does this PR do?
+
+
+
+### Background info
+
+
+
+### How can this be tested (manually and/or automated test)?
+
+
+#### Provide manual tests steps if applicable
+
+
+#### Provide steps for running automated tests if applicable
+
+### Which issue(s) is/are related to this PR?
+
+
+This PR is/are related to issue(s)
+
+
+close
diff --git a/.github/workflows/BuildNDeployDev.yml b/.github/workflows/BuildNDeployDev.yml
index a02237ec9c..e497f632cf 100644
--- a/.github/workflows/BuildNDeployDev.yml
+++ b/.github/workflows/BuildNDeployDev.yml
@@ -1,44 +1,24 @@
-# This workflow will checkout the contents of the `development` branch of this repo, remove all files in the current S3 bucket, and push the contents
-# to the bucket. Once the contents of the S3 bucket has been updated, a call will be made to invalidate the cache in the CloudFront distribution.
-# The CloudFront distribution is configured to pull the contents from the S3 bucket once an `invalidation` request is sent.
-name: Build and Deploy Development Static Site
+name: Build and Deploy Development Static Site Dev # run this workflow when a push has been made. if a push has been made to the development branch it will deploy the site to the hosting environment
on: # run this workflow when a push has been made to `development` branch
push:
- branches:
- - development
+ branches-ignore:
+ - production
repository_dispatch: # Listen for repository dispatch event from open-sdg-data-starter workflow
types: [dev_triggered_from_open-sdg-data-starter]
jobs:
- deploy:
- runs-on: ubuntu-20.04
- environment:
- name: development
- url: https://${{ vars.SITE_DOMAIN_NAME }}
- steps:
- ###########################################################################################################
- # This is the CI portion
- ###########################################################################################################
+ build:
+ runs-on: ubuntu-22.04
+ steps:
- name: Checkout repo
- uses: actions/checkout@v2
- with:
- ref: development
+ uses: actions/checkout@v4
- name: Setup Ruby
- uses: actions/setup-ruby@v1
+ uses: ruby/setup-ruby@v1
with:
- ruby-version: '2.6' # Version range or exact version of a Ruby version to use, using semvers version range syntax.
-
-
- - name: Cache and Install Gem files
- uses: actions/cache@v3
- with:
- path: vendor/bundle
- key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
- restore-keys: |
- ${{ runner.os }}-gems-
+ ruby-version: '3.2' # Version range or exact version of a Ruby version to use, using semvers version range syntax.
- name: Install Ruby dependencies
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle
@@ -47,38 +27,48 @@ jobs:
run: bundle exec jekyll build --config _config.yml
- name: Test the HTML # test our rendered html files
- run: bash scripts/test/html_proofer.sh
-
- ###########################################################################################################
- # This is the CD portion
- ###########################################################################################################
-
- #- uses: actions/checkout@v1 # checks out the code in the repository
- - name: Setup Python
- uses: actions/setup-python@v4 # sets up python in our environment
+ run: bash scripts/test/html_proofer_staging.sh
+
+ - name: Zip site artifact # only zip the site if the push was made to the development branch
+ if: ${{ github.ref == 'refs/heads/development' }}
+ run: zip -r _site.zip _site
+
+ - name: Upload site artifact # only upload the zip if the push was made to the development branch
+ if: ${{ github.ref == 'refs/heads/development' }}
+ uses: actions/upload-artifact@v4
with:
- python-version: '3.x' # install python version 3.x, default architecture is x64
-
-
+ name: site-deployment-dev
+ path: _site.zip
+ retention-days: 1 # delete the artifact after 1 day
+
+ deploy:
+ runs-on: ubuntu-22.04
+ needs: [build]
+ if: (github.ref == 'refs/heads/development')
+ environment:
+ name: development
+ url: https://${{ vars.SITE_DOMAIN_NAME }}
+ steps:
- name: Install AWS CLI
run: pip3 install awscli --upgrade --user # install the cli with upgrade to any requirements and into the subdir of the user
-
-
+
- name: Configure AWS Credentials
- uses: aws-actions/configure-aws-credentials@v1-node16 # use the official GitHub Action from AWS to setup credentials
+ uses: aws-actions/configure-aws-credentials@v4 # use the official GitHub Action from AWS to setup credentials
with:
- aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
- aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
mask-aws-account-id: true
+
+ - name: Fetch site artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: site-deployment-dev
+
+ - name: Unzip site artifact
+ run: unzip _site.zip
-
- name: Push Contents to S3 # push the current working directory to the S3 bucket
run: aws s3 sync _site/ s3://${{ secrets.S3_BUCKET_NAME }} --exclude ".git/*" --exclude ".github/*" --delete # have the bucket have the same content in the repo & exclude the git related directories.
-
- name: Invalidate CloudFront Cache # Invalidate the CloudFront Distribution Cache to get contents from the S3 bucket
- run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CDN_DISTRIBUTION_ID }} --paths "/*"
-
-
-
+ run: aws cloudfront create-invalidation --distribution-id "$CDN_DISTRIBUTION_ID" --paths "/*"
diff --git a/.github/workflows/BuildNDeployProd.yml b/.github/workflows/BuildNDeployProd.yml
index 98f4548197..bf69a03cfc 100644
--- a/.github/workflows/BuildNDeployProd.yml
+++ b/.github/workflows/BuildNDeployProd.yml
@@ -1,8 +1,5 @@
-# This workflow will checkout the contents of the `production` branch of this repo, remove all files in the current S3 bucket, and push the contents
-# to the bucket. Once the contents of the S3 bucket has been updated, a call will be made to invalidate the cache in the CloudFront distribution.
-# The CloudFront distribution is configured to pull the contents from the S3 bucket once an `invalidation` request is sent.
-name: Build and Deploy Production Static Site
+name: Build and Deploy Production Static Site Prod # run this workflow when a push has been made to production branch
on: # run this workflow when a push has been made to `Jekyll-Alf` branch
push:
@@ -13,7 +10,7 @@ on: # run this workflow when a push has been made to `Jekyll-Alf` branch
jobs:
deploy:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
environment:
name: production
url: https://${{ vars.SITE_DOMAIN_NAME }}
@@ -22,22 +19,14 @@ jobs:
# This is the CI portion
###########################################################################################################
- name: Checkout repo
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
ref: production
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
- ruby-version: '2.6' # Version range or exact version of a Ruby version to use, using semvers version range syntax.
-
- - name: Cache and Install Gem files
- uses: actions/cache@v3
- with:
- path: vendor/bundle
- key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
- restore-keys: |
- ${{ runner.os }}-gems-
+ ruby-version: '3.2' # Version range or exact version of a Ruby version to use, using semvers version range syntax.
- name: Install Ruby dependencies
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle
@@ -46,37 +35,24 @@ jobs:
run: bundle exec jekyll build --config _config.yml,_config_prod.yml
- name: Test the HTML # test our rendered html files
- run: bash scripts/test/html_proofer.sh
+ run: bash scripts/test/html_proofer_prod.sh
###########################################################################################################
# This is the CD portion
###########################################################################################################
-
- #- uses: actions/checkout@v1 # checks out the code in the repository
- - name: Setup Python
- uses: actions/setup-python@v4 # sets up python in our environment
- with:
- python-version: '3.x' # install python version 3.x, default architecture is x64
-
-
+
- name: Install AWS CLI
run: pip3 install awscli --upgrade --user # install the cli with upgrade to any requirements and into the subdir of the user
-
- name: Configure AWS Credentials
- uses: aws-actions/configure-aws-credentials@v1-node16 # use the official GitHub Action from AWS to setup credentials
+ uses: aws-actions/configure-aws-credentials@v4 # use the official GitHub Action from AWS to setup credentials
with:
- aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
- aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
mask-aws-account-id: true
-
- name: Push Contents to S3 # push the current working directory to the S3 bucket
run: aws s3 sync _site/ s3://${{ secrets.S3_BUCKET_NAME }} --exclude ".git/*" --exclude ".github/*" --delete # have the bucket have the same content in the repo & exclude the git related directories.
- name: Invalidate CloudFront Cache # Invalidate the CloudFront Distribution Cache to get contents from the S3 bucket
- run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CDN_DISTRIBUTION_ID }} --paths "/*"
-
-
-
+ run: aws cloudfront create-invalidation --distribution-id "$CDN_DISTRIBUTION_ID" --paths "/*"
diff --git a/.gitignore b/.gitignore
index 4269acc7a2..900cedb48a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,8 @@ _site/
.spyproject/
*__pycache__/
*.Rproj
-Gemfile.lock
deploy_key*
deploy_key*.pub
*.keybase
+vendor/
+_test/
diff --git a/Gemfile b/Gemfile
index d08452dbfe..010051506c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,9 @@
source "https://rubygems.org"
-gem "jekyll", "3.8.4"
-gem "html-proofer"
+gem "jekyll", "3.9.3"
+gem "html-proofer", "3.19.4"
gem "jekyll-remote-theme"
-gem "jekyll-open-sdg-plugins", "~> 0.0.15"
+gem "deep_merge"
+gem "jekyll-open-sdg-plugins", "2.3.0"
+gem "kramdown-parser-gfm"
+gem "webrick"
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000000..78f38e30a9
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,117 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ addressable (2.8.6)
+ public_suffix (>= 2.0.2, < 6.0)
+ colorator (1.1.0)
+ concurrent-ruby (1.2.3)
+ deep_merge (1.2.2)
+ ecma-re-validator (0.4.0)
+ regexp_parser (~> 2.2)
+ em-websocket (0.5.3)
+ eventmachine (>= 0.12.9)
+ http_parser.rb (~> 0)
+ ethon (0.16.0)
+ ffi (>= 1.15.0)
+ eventmachine (1.2.7)
+ ffi (1.16.3)
+ forwardable-extended (2.6.0)
+ hana (1.3.7)
+ html-proofer (3.19.4)
+ addressable (~> 2.3)
+ mercenary (~> 0.3)
+ nokogiri (~> 1.13)
+ parallel (~> 1.10)
+ rainbow (~> 3.0)
+ typhoeus (~> 1.3)
+ yell (~> 2.0)
+ http_parser.rb (0.8.0)
+ i18n (1.14.4)
+ concurrent-ruby (~> 1.0)
+ jekyll (3.9.3)
+ addressable (~> 2.4)
+ colorator (~> 1.0)
+ em-websocket (~> 0.5)
+ i18n (>= 0.7, < 2)
+ jekyll-sass-converter (~> 1.0)
+ jekyll-watch (~> 2.0)
+ kramdown (>= 1.17, < 3)
+ liquid (~> 4.0)
+ mercenary (~> 0.3.3)
+ pathutil (~> 0.9)
+ rouge (>= 1.7, < 4)
+ safe_yaml (~> 1.0)
+ jekyll-open-sdg-plugins (2.3.0)
+ deep_merge (~> 1.2)
+ jekyll (~> 3.0)
+ json_schemer (~> 0.2)
+ jekyll-remote-theme (0.4.3)
+ addressable (~> 2.0)
+ jekyll (>= 3.5, < 5.0)
+ jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
+ rubyzip (>= 1.3.0, < 3.0)
+ jekyll-sass-converter (1.5.2)
+ sass (~> 3.4)
+ jekyll-watch (2.2.1)
+ listen (~> 3.0)
+ json_schemer (0.2.25)
+ ecma-re-validator (~> 0.3)
+ hana (~> 1.3)
+ regexp_parser (~> 2.0)
+ simpleidn (~> 0.2)
+ uri_template (~> 0.7)
+ kramdown (2.4.0)
+ rexml
+ kramdown-parser-gfm (1.1.0)
+ kramdown (~> 2.0)
+ liquid (4.0.4)
+ listen (3.9.0)
+ rb-fsevent (~> 0.10, >= 0.10.3)
+ rb-inotify (~> 0.9, >= 0.9.10)
+ mercenary (0.3.6)
+ nokogiri (1.16.2-x86_64-linux)
+ racc (~> 1.4)
+ parallel (1.24.0)
+ pathutil (0.16.2)
+ forwardable-extended (~> 2.6)
+ public_suffix (5.0.4)
+ racc (1.7.3)
+ rainbow (3.1.1)
+ rb-fsevent (0.11.2)
+ rb-inotify (0.10.1)
+ ffi (~> 1.0)
+ regexp_parser (2.9.0)
+ rexml (3.2.6)
+ rouge (3.30.0)
+ rubyzip (2.3.2)
+ safe_yaml (1.0.5)
+ sass (3.7.4)
+ sass-listen (~> 4.0.0)
+ sass-listen (4.0.0)
+ rb-fsevent (~> 0.9, >= 0.9.4)
+ rb-inotify (~> 0.9, >= 0.9.7)
+ simpleidn (0.2.1)
+ unf (~> 0.1.4)
+ typhoeus (1.4.1)
+ ethon (>= 0.9.0)
+ unf (0.1.4)
+ unf_ext
+ unf_ext (0.0.9.1)
+ uri_template (0.7.0)
+ webrick (1.8.1)
+ yell (2.2.2)
+
+PLATFORMS
+ x86_64-linux
+
+DEPENDENCIES
+ deep_merge
+ html-proofer (= 3.19.4)
+ jekyll (= 3.9.3)
+ jekyll-open-sdg-plugins (= 2.3.0)
+ jekyll-remote-theme
+ kramdown-parser-gfm
+ webrick
+
+BUNDLED WITH
+ 2.4.19
diff --git a/README.md b/README.md
index 0f529f150f..1f973bfb5f 100644
--- a/README.md
+++ b/README.md
@@ -3,18 +3,43 @@
This is a starter repository to help in implementing the [Open SDG](https://github.com/open-sdg/open-sdg) platform. [See here for documentation](https://open-sdg.readthedocs.io).
-### Installing Jekyll Locally
+### Testing w/ Jekyll Locally
-Installation Instructions for Jekyll: https://jekyllrb.com/docs/
+#### Preparing the SDG Data Site
-Configuration Information for Jekyll: https://jekyllrb.com/docs/configuration/options/
+You will need to build the SDG Data site first locally in order to proceed with building and testing the SDG Site Starter first.
-### Testing w/ Jekyll Locally
+1.) Refer to the commands in https://github.com/CityOfLosAngeles/open-sdg-data-starter to setup your local environment.
+
+2.) Proceed to navigate to the `_site` in the terminal of VS Code while in the container after building the data site locally and run `python3 -m http.server 9000`.
+
+3.) The data site is now accessible via `localhost:9000`.
-**Test what staging will look like by running the following command:**
+4.) In a separate VS Code window have this project opened and navigate to the `_config.yml` file and change `remote_data_prefix:` set to `"http://localhost:9000"`. Remember to revert this change before committing.
-`bundle exec jekyll`
+5.) Proceed with the steps below after running `bundle check --path=vendor/bundle || bundle install --path=vendor/bundle` to install the necessary dependencies.
+
+**Test what development will look like by running the following command:**
+
+`bundle exec jekyll serve --config _config.yml`
**Test what production will look like by running the following command:**
`bundle exec jekyll serve --config _config.yml,_config_prod.yml`
+
+For each command listed above, you will be able to access the site locally by visiting `http://127.0.0.1:4000/`. Please be aware that not everything may load due to CORS. You may verify this with ChromeDevTools for example.
+
+**To build the development site locally and have `_site` directory updated and available:**
+
+`bundle exec jekyll build --config _config.yml`. Run `./scripts/test/html_proofer_staging.sh` to perform html validation.
+
+**To build the development site locally and have `_site` directory updated and available:**
+
+`bundle exec jekyll build --config _config.yml,_config_prod.yml`. Note you may need to change the `remote_data_prefix:` in `_config_prod.yml` appropraitely as you see fit. Run `./scripts/test/html_proofer_prod.sh` to perform html validation.
+
+### GitHub Actions
+
+GitHub Actions is used for building, verifying, and deploying the site contents. The production GitHub Actions workflow file, `BuildNDeployProd.yml` is currently
+configured to build, verify, and deploy the site to the production environment. The development GitHub Actions workflow file, `BuildNDeployDev.yml` currently is
+configured to build and verify the site when git pushes are made to any branch but `production` verifying changes within the branch that was pushed. On git pushes to
+the `development` branch, the workflow will proceed to build, verify, and deploy the site to the development environment.
diff --git a/_config.yml b/_config.yml
index 91afd29afd..e995958f7d 100755
--- a/_config.yml
+++ b/_config.yml
@@ -20,7 +20,7 @@ environment: staging
# Replace MY-GITHUB-ORG and OPEN-SDG-DATA-STARTER as needed.
remote_data_prefix: "https://sdgdatabase-dev.itacloudops.org"
remote_translations:
- - https://open-sdg.github.io/sdg-translations/translations-0.8.1.json
+ - https://open-sdg.github.io/sdg-translations/translations-2.1.0.json
create_indicators:
layout: indicator
@@ -50,8 +50,16 @@ org_name: CityOfLosAngeles
# Build settings
markdown: kramdown
-# Travis Support
-exclude: [vendor, scripts, remotedata]
+# Exclude some files/folders.
+exclude:
+ - vendor
+ - scripts
+ - remotedata
+ - Gemfile
+ - Gemfile.lock
+ - README
+ - README.md
+ - LICENSE
# International Support
# Eg name: Australia and adjective: Australian
@@ -110,7 +118,7 @@ plugins:
- jekyll-open-sdg-plugins
# Tell the Remote Theme plugin to use the Open SDG platform (Jekyll theme).
-remote_theme: open-sdg/open-sdg@0.9.4
+remote_theme: open-sdg/open-sdg@2.3.0
# Apply any custom CSS.
custom_css:
@@ -150,4 +158,21 @@ frontpage_cards:
* [Publication](https://example.com)
# Optionally add a button at the bottom of the card.
button_label: View more publications
- button_link: https://example.com
+ button_link: https://example.com
+
+# TODO: Investigate this https://open-sdg.readthedocs.io/en/latest/configuration/#reporting_status
+reporting_status:
+ title: title goes here
+ description: description goes here
+ disaggregation_indicator_count_label: indicators in scope
+ disaggregation_tabs: true
+ status_types:
+ - value: notstarted
+ label: status.exploring_data_sources
+ hide_on_goal_pages: false
+ - value: complete
+ label: status.reported_online
+ hide_on_goal_pages: true
+ - value: notapplicable
+ label: status.not_applicable
+ hide_on_goal_pages: false
diff --git a/_config_prod.yml b/_config_prod.yml
index 7918f7f969..79ffe08bee 100755
--- a/_config_prod.yml
+++ b/_config_prod.yml
@@ -13,6 +13,6 @@ environment: production
# Uncomment and configure to point to a different data source for production.
remote_data_prefix: https://sdgdatabase.lamayor.org
remote_translations:
- - https://open-sdg.github.io/sdg-translations/translations-0.8.1.json
+ - https://open-sdg.github.io/sdg-translations/translations-2.1.0.json
analytics:
ga_prod: 'UA-98192566-4'
diff --git a/_layouts/frontpage.html b/_layouts/frontpage.html
index b594faf492..a3a16628b1 100644
--- a/_layouts/frontpage.html
+++ b/_layouts/frontpage.html
@@ -1,42 +1,47 @@
-{%- include multilingual.html -%}
{% include head.html %}
{% include header.html %}
-
{{ site.frontpage_instructions | default: instructions_default | t }}
-
-
The City of Los Angeles is currently exploring data sources for the SDG indicators. To submit data, please email us at {{site.email_contacts.questions}}.
' %}
- {% endfor %}
- {% comment %}
- If there were exactly 17 goals, "pad" it with 1 more, to make it come
- out more symmetrically.
- {% endcomment %}
- {% if goals.size == 17 %}
-
-
-
+
+
+ {% if site.frontpage_introduction_banner %}
+
+
{{ site.frontpage_introduction_banner.title | t }}
+
{{ site.frontpage_introduction_banner.description | t | markdownify }}
+
{% endif %}
+
+ {% if site.frontpage_goals_grid %}
+
{{ site.frontpage_goals_grid.description | t | markdownify }}
+ {% endif %}
+
+ {% include components/goal-tiles.html %}
-
Did you use the data or indicators available on this platform? Please share your use cases with us at {{site.email_contacts.questions}}.
- {% include components/download-all-metadata.html %}
+ {% endif %}
+
+ {% if site.frontpage_cards %}
+
+ {% for card in site.frontpage_cards %}
+ {% assign remainder = forloop.index | modulo: 3 %}
+
+ {% if remainder == 1 or forloop.first %}
+
+ {% endif %}
+
+ {% include components/card.html card=card %}
+
+ {% if remainder == 0 or forloop.last %}
+
+ {% endif %}
+
+ {% endfor %}
+
+ {% endif %}
+
-{% include footer.html %}
+{% include footer.html %}
\ No newline at end of file
diff --git a/_layouts/goal-by-target.html b/_layouts/goal-by-target.html
deleted file mode 100644
index 567c392635..0000000000
--- a/_layouts/goal-by-target.html
+++ /dev/null
@@ -1,99 +0,0 @@
-{%- include multilingual.html -%}
-{%- include goal-variables.html -%}
-{% include head.html %}
-{% include header.html %}
-
-
+ {% include components/indicator/data-notice.html %}
+ {% include components/indicator/indicator-available.html %}
+ {% include components/indicator/proxy-banner.html %}
+ {% include components/indicator/indicator-progress.html %}
+ {% include components/indicator/indicator-content.html %}
+ {% include components/indicator/indicator-main.html %}
+ {% include back-to-top.html %}
-{% include footer.html %}
+{% include footer.html %}
\ No newline at end of file
diff --git a/_layouts/reportingstatus.html b/_layouts/reportingstatus.html
index 070f8ee62b..8f36371597 100644
--- a/_layouts/reportingstatus.html
+++ b/_layouts/reportingstatus.html
@@ -1,96 +1,112 @@
-{% include multilingual.html %}
{% include head.html %}
{% include header.html %}
-
-{% include footer.html %}
+{% include footer.html %}
\ No newline at end of file
diff --git a/_layouts/search.html b/_layouts/search.html
index da13a0efcb..fde6de7434 100644
--- a/_layouts/search.html
+++ b/_layouts/search.html
@@ -1,40 +1,71 @@
-{%- include multilingual.html -%}
{% include head.html %}
{% include header.html %}
-
-
{{ t.search.search_results_for }} ''
- {% include components/loading.html %}
-
-
-
-
-
+
+
+
+ {% include components/page/breadcrumbs.html %}
+
+
+
{{ page.t.search.search_results_for }} ''
+ {% include search.html id="search-bar-on-page" not_in_menu=true %}
+ {% include components/loading.html %}
+
+
-{% include footer.html %}
+
+{% if page.language != 'en' %}
+
+
+{% endif %}
+{% include footer.html %}
\ No newline at end of file
diff --git a/_sass/custom.scss b/_sass/custom.scss
new file mode 100644
index 0000000000..534ef7a0b6
--- /dev/null
+++ b/_sass/custom.scss
@@ -0,0 +1 @@
+// Enter any custom Sass in this file.
diff --git a/_sass/variables.scss b/_sass/variables.scss
new file mode 100644
index 0000000000..58f7577622
--- /dev/null
+++ b/_sass/variables.scss
@@ -0,0 +1,14 @@
+// Here you can override any of the Sass variables from Open SDG. This is the
+// easiest way to change things like colors and dimensions. Below are a few
+// examples of variables. For a full list, see this folder:
+// https://github.com/open-sdg/open-sdg/tree/master/_sass/variables
+
+//$goal-colors: #E52B3D #DDA63A #4C9F38 #C42130 #FF3E24 #28BCE1 #FCC30B #A21942 #FD6925 #DD1367 #FD9C27 #BF8B2E #417D46 #0A96D8 #57BE2F #00689C #1F4A6A;
+//$goal-banner-backgroundColors: white white white white white white white white white white white white white white white white white;
+//$text-color: #333;
+//$color-dark: black;
+//$color-light: white;
+//$backgroundColor: white;
+//$link-color: #337ab7;
+//$footer-text-color: #000000;
+$indicatorContent-horizontalRule-color: transparent;
diff --git a/assets/css/README.md b/assets/css/README.md
new file mode 100644
index 0000000000..3c4a396438
--- /dev/null
+++ b/assets/css/README.md
@@ -0,0 +1 @@
+Override any CSS from the Jekyll theme in this folder, or add your own.
\ No newline at end of file
diff --git a/assets/img/SDG_logo.png b/assets/img/SDG_logo.png
index bc3bc1d2e8..bb29fd8a83 100644
Binary files a/assets/img/SDG_logo.png and b/assets/img/SDG_logo.png differ
diff --git a/assets/img/favicons/android-chrome-192x192.png b/assets/img/favicons/android-chrome-192x192.png
new file mode 100644
index 0000000000..a95b24a069
Binary files /dev/null and b/assets/img/favicons/android-chrome-192x192.png differ
diff --git a/assets/img/favicons/android-chrome-512x512.png b/assets/img/favicons/android-chrome-512x512.png
new file mode 100644
index 0000000000..aefbf81071
Binary files /dev/null and b/assets/img/favicons/android-chrome-512x512.png differ
diff --git a/assets/img/favicons/apple-touch-icon.png b/assets/img/favicons/apple-touch-icon.png
new file mode 100644
index 0000000000..843ddf5547
Binary files /dev/null and b/assets/img/favicons/apple-touch-icon.png differ
diff --git a/assets/img/favicons/favicon-16x16.png b/assets/img/favicons/favicon-16x16.png
new file mode 100644
index 0000000000..ba8189418b
Binary files /dev/null and b/assets/img/favicons/favicon-16x16.png differ
diff --git a/assets/img/favicons/favicon-32x32.png b/assets/img/favicons/favicon-32x32.png
new file mode 100644
index 0000000000..c75aee3485
Binary files /dev/null and b/assets/img/favicons/favicon-32x32.png differ
diff --git a/assets/js/README.md b/assets/js/README.md
new file mode 100644
index 0000000000..50c9fc8217
--- /dev/null
+++ b/assets/js/README.md
@@ -0,0 +1 @@
+Override any javascript from the Jekyll theme in this folder, or add your own.
diff --git a/assets/js/custom.js b/assets/js/custom.js
new file mode 100644
index 0000000000..e00cc5e68e
--- /dev/null
+++ b/assets/js/custom.js
@@ -0,0 +1 @@
+// Add any custom javascript here.
diff --git a/scripts/batch/add_language.py b/scripts/batch/add_language.py
index 595bfcceab..f3dfac6663 100644
--- a/scripts/batch/add_language.py
+++ b/scripts/batch/add_language.py
@@ -19,9 +19,9 @@
import sys
import os
-def add_language(new_language):
- # We only care about these three folders.
- folders = ['_indicators', '_goals', '_pages']
+def add_language(new_language, language_public):
+ # We only care about one folder.
+ folders = ['_pages', '_posts']
for folder in folders:
new_folder = os.path.join(folder, new_language)
# Abort if folder already exists.
@@ -39,29 +39,25 @@ def add_language(new_language):
shutil.copyfile(source_file, new_file)
# Change the copied files to reflect the new language.
for line in fileinput.input(glob.glob(new_folder + '/*'), inplace=True):
- # Skip a few unnecessary lines.
- if folder == '_goals' and line.startswith('title:'):
- continue
- if folder == '_goals' and line.startswith('short:'):
- continue
- if folder == '_goals' and line.startswith(' '):
- continue
# Look for the permalink line, and add the language.
if line.startswith('permalink: /'):
- sys.stdout.write(line.replace('permalink: /', 'permalink: /' + new_language + '/'))
+ sys.stdout.write(line.replace('permalink: /', 'permalink: /' + language_public + '/'))
sys.stdout.write('language: ' + new_language + '\n')
- else:
+ elif not line.startswith('language: '):
sys.stdout.write(line)
def main():
# Abort if there is no parameter provided.
if len(sys.argv) < 2:
- sys.exit('Provide a 2-letter abbreviation for the new language.')
+ sys.exit('Provide a 2-letter abbreviation for the new language. Optionally also provide a second alternative abbreviation to use in permalinks.')
language = sys.argv[1]
- add_language(language)
+ language_public = language
+ if len(sys.argv) == 3:
+ language_public = sys.argv[2]
+ add_language(language, language_public)
print("Don't forget to update the 'languages' list in _config.yml!")
# Boilerplace syntax for running the main function.
if __name__ == '__main__':
- main()
+ main()
\ No newline at end of file
diff --git a/scripts/test/html_proofer.sh b/scripts/test/html_proofer_prod.sh
old mode 100644
new mode 100755
similarity index 51%
rename from scripts/test/html_proofer.sh
rename to scripts/test/html_proofer_prod.sh
index 22ad425d70..7dc3241a37
--- a/scripts/test/html_proofer.sh
+++ b/scripts/test/html_proofer_prod.sh
@@ -1,4 +1,4 @@
#!/bin/bash
# The following assumes the site is already built at _site.
-bundle exec htmlproofer --disable-external ./_site
+bundle exec htmlproofer --allow-hash-href --disable-external ./_site
\ No newline at end of file
diff --git a/scripts/test/html_proofer_staging.sh b/scripts/test/html_proofer_staging.sh
new file mode 100755
index 0000000000..5198062826
--- /dev/null
+++ b/scripts/test/html_proofer_staging.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# The following script assumes the site is already built at _site.
+
+# Figure out the Jekyll baseurl. If this doesn't work for some reason, you can
+# just hardcode it, eg: JEKYLL_BASEURL="/my-baseurl"
+JEKYLL_BASEURL=/$GITHUB_REPOSITORY_NAME_PART
+# We have to create a temporary folder to test in, because html-proofer does not
+# like Jekyll's "baseurl", and interprets most links as broken.
+mkdir -p ./_test$JEKYLL_BASEURL &&
+cp -r ./_site/* ./_test$JEKYLL_BASEURL/ &&
+touch ./_test/index.html &&
+bundle exec htmlproofer --allow-hash-href --disable-external ./_test &&
+rm -rf ./_test
\ No newline at end of file