From 4c9c3761e9f4d609e5d08d013d01e05e7714e23c Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Thu, 12 Nov 2020 16:18:32 -0500 Subject: [PATCH 01/17] feat: add covidcast page as embedded from --- content/covidcast.md | 13 +++++++++++++ layouts/covidcast/baseof.html | 11 +++++++++++ layouts/covidcast/single.html | 1 + layouts/shortcodes/covidcast.html | 8 ++++++++ themes/delphi/assets/js/main.js | 6 +++--- 5 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 content/covidcast.md create mode 100644 layouts/covidcast/baseof.html create mode 100644 layouts/covidcast/single.html create mode 100644 layouts/shortcodes/covidcast.html diff --git a/content/covidcast.md b/content/covidcast.md new file mode 100644 index 000000000..982b45d94 --- /dev/null +++ b/content/covidcast.md @@ -0,0 +1,13 @@ +--- +title: COVIDCast +type: covidcast +scripts: + - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/vendors.js + - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/styles.js + - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/bundle.js +styles: + - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/vendors.css + - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/styles.css +--- + +{{}} \ No newline at end of file diff --git a/layouts/covidcast/baseof.html b/layouts/covidcast/baseof.html new file mode 100644 index 000000000..8cf5dccf2 --- /dev/null +++ b/layouts/covidcast/baseof.html @@ -0,0 +1,11 @@ + + + + {{ partial "head.html" . }} + + {{ partial "nav.html" . }} + {{ block "main" . }} + {{ end }} + {{ partial "footer.html" . }} + + diff --git a/layouts/covidcast/single.html b/layouts/covidcast/single.html new file mode 100644 index 000000000..d975ecbd1 --- /dev/null +++ b/layouts/covidcast/single.html @@ -0,0 +1 @@ +{{ define "main" }} {{ .Content }} {{ end }} diff --git a/layouts/shortcodes/covidcast.html b/layouts/shortcodes/covidcast.html new file mode 100644 index 000000000..38ab20304 --- /dev/null +++ b/layouts/shortcodes/covidcast.html @@ -0,0 +1,8 @@ +
+ +
diff --git a/themes/delphi/assets/js/main.js b/themes/delphi/assets/js/main.js index b65c49b8f..713b37043 100644 --- a/themes/delphi/assets/js/main.js +++ b/themes/delphi/assets/js/main.js @@ -1,6 +1,6 @@ -import UIKit from '../uikit/dist/js/uikit.js'; +import UIkit from '../uikit/dist/js/uikit.js'; import plugin from '../uikit/dist/js/uikit-icons.js'; -UIKit.use(plugin); +UIkit.use(plugin); -window.UIKit = UIKit; \ No newline at end of file +window.UIkit = UIkit; \ No newline at end of file From a9ced5c194fee58ff2427a018ddfbb887f202adf Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Mon, 16 Nov 2020 15:08:35 -0500 Subject: [PATCH 02/17] refactor: move files to match desired hierarchy --- content/covidcast.md | 13 ------------- content/covidcast/_index.md | 13 +++++++++++++ content/{ => covidcast}/indicators/cases.md | 0 content/{ => covidcast}/indicators/combined.md | 0 content/{ => covidcast}/indicators/deaths.md | 0 content/{ => covidcast}/indicators/doctor-visits.md | 0 content/{ => covidcast}/indicators/google-trends.md | 0 .../indicators/hospital-admissions.md | 0 content/{ => covidcast}/indicators/index.md | 0 content/{ => covidcast}/indicators/quidel-flu.md | 0 content/{ => covidcast}/indicators/quidel.md | 0 content/{ => covidcast}/indicators/safegraph.md | 0 content/{ => covidcast}/indicators/survey-google.md | 0 .../indicators/symptoms-community-fb.md | 0 content/{ => covidcast}/indicators/symptoms-fb.md | 0 content/{ => covidcast}/methodology.md | 0 content/{ => covidcast}/release-notes/index.md | 0 content/{ => covidcast}/release-notes/v1.0.md | 0 content/{ => covidcast}/release-notes/v1.1.md | 0 content/{ => covidcast}/release-notes/v1.10.0.md | 0 content/{ => covidcast}/release-notes/v1.2.1.md | 0 content/{ => covidcast}/release-notes/v1.2.md | 0 content/{ => covidcast}/release-notes/v1.3.md | 0 content/{ => covidcast}/release-notes/v1.4.1.md | 0 content/{ => covidcast}/release-notes/v1.4.md | 0 content/{ => covidcast}/release-notes/v1.5.md | 0 content/{ => covidcast}/release-notes/v1.6.md | 0 content/{ => covidcast}/release-notes/v1.7.md | 0 content/{ => covidcast}/release-notes/v1.8.md | 0 content/{ => covidcast}/release-notes/v1.9.2.md | 0 content/{ => covidcast}/release-notes/v1.9.3.md | 0 content/{ => covidcast}/release-notes/v1.9.md | 0 content/{ => covidcast}/surveys.md | 0 content/{ => covidcast}/terms-of-use.md | 0 layouts/{covidcast => covidcast_app}/baseof.html | 0 .../single.html => covidcast_app/list.html} | 0 layouts/shortcodes/indicators.html | 2 +- layouts/shortcodes/releasenotes.html | 2 +- 38 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 content/covidcast.md create mode 100644 content/covidcast/_index.md rename content/{ => covidcast}/indicators/cases.md (100%) rename content/{ => covidcast}/indicators/combined.md (100%) rename content/{ => covidcast}/indicators/deaths.md (100%) rename content/{ => covidcast}/indicators/doctor-visits.md (100%) rename content/{ => covidcast}/indicators/google-trends.md (100%) rename content/{ => covidcast}/indicators/hospital-admissions.md (100%) rename content/{ => covidcast}/indicators/index.md (100%) rename content/{ => covidcast}/indicators/quidel-flu.md (100%) rename content/{ => covidcast}/indicators/quidel.md (100%) rename content/{ => covidcast}/indicators/safegraph.md (100%) rename content/{ => covidcast}/indicators/survey-google.md (100%) rename content/{ => covidcast}/indicators/symptoms-community-fb.md (100%) rename content/{ => covidcast}/indicators/symptoms-fb.md (100%) rename content/{ => covidcast}/methodology.md (100%) rename content/{ => covidcast}/release-notes/index.md (100%) rename content/{ => covidcast}/release-notes/v1.0.md (100%) rename content/{ => covidcast}/release-notes/v1.1.md (100%) rename content/{ => covidcast}/release-notes/v1.10.0.md (100%) rename content/{ => covidcast}/release-notes/v1.2.1.md (100%) rename content/{ => covidcast}/release-notes/v1.2.md (100%) rename content/{ => covidcast}/release-notes/v1.3.md (100%) rename content/{ => covidcast}/release-notes/v1.4.1.md (100%) rename content/{ => covidcast}/release-notes/v1.4.md (100%) rename content/{ => covidcast}/release-notes/v1.5.md (100%) rename content/{ => covidcast}/release-notes/v1.6.md (100%) rename content/{ => covidcast}/release-notes/v1.7.md (100%) rename content/{ => covidcast}/release-notes/v1.8.md (100%) rename content/{ => covidcast}/release-notes/v1.9.2.md (100%) rename content/{ => covidcast}/release-notes/v1.9.3.md (100%) rename content/{ => covidcast}/release-notes/v1.9.md (100%) rename content/{ => covidcast}/surveys.md (100%) rename content/{ => covidcast}/terms-of-use.md (100%) rename layouts/{covidcast => covidcast_app}/baseof.html (100%) rename layouts/{covidcast/single.html => covidcast_app/list.html} (100%) diff --git a/content/covidcast.md b/content/covidcast.md deleted file mode 100644 index 982b45d94..000000000 --- a/content/covidcast.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: COVIDCast -type: covidcast -scripts: - - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/vendors.js - - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/styles.js - - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/bundle.js -styles: - - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/vendors.css - - https://deploy-preview-631--cmu-delphi-covidcast.netlify.app/styles.css ---- - -{{}} \ No newline at end of file diff --git a/content/covidcast/_index.md b/content/covidcast/_index.md new file mode 100644 index 000000000..15736f638 --- /dev/null +++ b/content/covidcast/_index.md @@ -0,0 +1,13 @@ +--- +title: COVIDCast +type: covidcast_app +scripts: + - ./covidcast/vendors.js + - ./covidcast/styles.js + - ./covidcast/bundle.js +styles: + - ./covidcast/vendors.css + - ./covidcast/styles.css +--- + +{{}} \ No newline at end of file diff --git a/content/indicators/cases.md b/content/covidcast/indicators/cases.md similarity index 100% rename from content/indicators/cases.md rename to content/covidcast/indicators/cases.md diff --git a/content/indicators/combined.md b/content/covidcast/indicators/combined.md similarity index 100% rename from content/indicators/combined.md rename to content/covidcast/indicators/combined.md diff --git a/content/indicators/deaths.md b/content/covidcast/indicators/deaths.md similarity index 100% rename from content/indicators/deaths.md rename to content/covidcast/indicators/deaths.md diff --git a/content/indicators/doctor-visits.md b/content/covidcast/indicators/doctor-visits.md similarity index 100% rename from content/indicators/doctor-visits.md rename to content/covidcast/indicators/doctor-visits.md diff --git a/content/indicators/google-trends.md b/content/covidcast/indicators/google-trends.md similarity index 100% rename from content/indicators/google-trends.md rename to content/covidcast/indicators/google-trends.md diff --git a/content/indicators/hospital-admissions.md b/content/covidcast/indicators/hospital-admissions.md similarity index 100% rename from content/indicators/hospital-admissions.md rename to content/covidcast/indicators/hospital-admissions.md diff --git a/content/indicators/index.md b/content/covidcast/indicators/index.md similarity index 100% rename from content/indicators/index.md rename to content/covidcast/indicators/index.md diff --git a/content/indicators/quidel-flu.md b/content/covidcast/indicators/quidel-flu.md similarity index 100% rename from content/indicators/quidel-flu.md rename to content/covidcast/indicators/quidel-flu.md diff --git a/content/indicators/quidel.md b/content/covidcast/indicators/quidel.md similarity index 100% rename from content/indicators/quidel.md rename to content/covidcast/indicators/quidel.md diff --git a/content/indicators/safegraph.md b/content/covidcast/indicators/safegraph.md similarity index 100% rename from content/indicators/safegraph.md rename to content/covidcast/indicators/safegraph.md diff --git a/content/indicators/survey-google.md b/content/covidcast/indicators/survey-google.md similarity index 100% rename from content/indicators/survey-google.md rename to content/covidcast/indicators/survey-google.md diff --git a/content/indicators/symptoms-community-fb.md b/content/covidcast/indicators/symptoms-community-fb.md similarity index 100% rename from content/indicators/symptoms-community-fb.md rename to content/covidcast/indicators/symptoms-community-fb.md diff --git a/content/indicators/symptoms-fb.md b/content/covidcast/indicators/symptoms-fb.md similarity index 100% rename from content/indicators/symptoms-fb.md rename to content/covidcast/indicators/symptoms-fb.md diff --git a/content/methodology.md b/content/covidcast/methodology.md similarity index 100% rename from content/methodology.md rename to content/covidcast/methodology.md diff --git a/content/release-notes/index.md b/content/covidcast/release-notes/index.md similarity index 100% rename from content/release-notes/index.md rename to content/covidcast/release-notes/index.md diff --git a/content/release-notes/v1.0.md b/content/covidcast/release-notes/v1.0.md similarity index 100% rename from content/release-notes/v1.0.md rename to content/covidcast/release-notes/v1.0.md diff --git a/content/release-notes/v1.1.md b/content/covidcast/release-notes/v1.1.md similarity index 100% rename from content/release-notes/v1.1.md rename to content/covidcast/release-notes/v1.1.md diff --git a/content/release-notes/v1.10.0.md b/content/covidcast/release-notes/v1.10.0.md similarity index 100% rename from content/release-notes/v1.10.0.md rename to content/covidcast/release-notes/v1.10.0.md diff --git a/content/release-notes/v1.2.1.md b/content/covidcast/release-notes/v1.2.1.md similarity index 100% rename from content/release-notes/v1.2.1.md rename to content/covidcast/release-notes/v1.2.1.md diff --git a/content/release-notes/v1.2.md b/content/covidcast/release-notes/v1.2.md similarity index 100% rename from content/release-notes/v1.2.md rename to content/covidcast/release-notes/v1.2.md diff --git a/content/release-notes/v1.3.md b/content/covidcast/release-notes/v1.3.md similarity index 100% rename from content/release-notes/v1.3.md rename to content/covidcast/release-notes/v1.3.md diff --git a/content/release-notes/v1.4.1.md b/content/covidcast/release-notes/v1.4.1.md similarity index 100% rename from content/release-notes/v1.4.1.md rename to content/covidcast/release-notes/v1.4.1.md diff --git a/content/release-notes/v1.4.md b/content/covidcast/release-notes/v1.4.md similarity index 100% rename from content/release-notes/v1.4.md rename to content/covidcast/release-notes/v1.4.md diff --git a/content/release-notes/v1.5.md b/content/covidcast/release-notes/v1.5.md similarity index 100% rename from content/release-notes/v1.5.md rename to content/covidcast/release-notes/v1.5.md diff --git a/content/release-notes/v1.6.md b/content/covidcast/release-notes/v1.6.md similarity index 100% rename from content/release-notes/v1.6.md rename to content/covidcast/release-notes/v1.6.md diff --git a/content/release-notes/v1.7.md b/content/covidcast/release-notes/v1.7.md similarity index 100% rename from content/release-notes/v1.7.md rename to content/covidcast/release-notes/v1.7.md diff --git a/content/release-notes/v1.8.md b/content/covidcast/release-notes/v1.8.md similarity index 100% rename from content/release-notes/v1.8.md rename to content/covidcast/release-notes/v1.8.md diff --git a/content/release-notes/v1.9.2.md b/content/covidcast/release-notes/v1.9.2.md similarity index 100% rename from content/release-notes/v1.9.2.md rename to content/covidcast/release-notes/v1.9.2.md diff --git a/content/release-notes/v1.9.3.md b/content/covidcast/release-notes/v1.9.3.md similarity index 100% rename from content/release-notes/v1.9.3.md rename to content/covidcast/release-notes/v1.9.3.md diff --git a/content/release-notes/v1.9.md b/content/covidcast/release-notes/v1.9.md similarity index 100% rename from content/release-notes/v1.9.md rename to content/covidcast/release-notes/v1.9.md diff --git a/content/surveys.md b/content/covidcast/surveys.md similarity index 100% rename from content/surveys.md rename to content/covidcast/surveys.md diff --git a/content/terms-of-use.md b/content/covidcast/terms-of-use.md similarity index 100% rename from content/terms-of-use.md rename to content/covidcast/terms-of-use.md diff --git a/layouts/covidcast/baseof.html b/layouts/covidcast_app/baseof.html similarity index 100% rename from layouts/covidcast/baseof.html rename to layouts/covidcast_app/baseof.html diff --git a/layouts/covidcast/single.html b/layouts/covidcast_app/list.html similarity index 100% rename from layouts/covidcast/single.html rename to layouts/covidcast_app/list.html diff --git a/layouts/shortcodes/indicators.html b/layouts/shortcodes/indicators.html index 114db7bee..df6c2c47f 100644 --- a/layouts/shortcodes/indicators.html +++ b/layouts/shortcodes/indicators.html @@ -1,6 +1,6 @@
-{{ $tools := .Site.GetPage "/indicators" }} +{{ $tools := .Site.GetPage "/covidcast/indicators" }} {{ range sort (where ($tools.Resources.ByType "page") ".Params.category" "eq" (.Get "category")) ".Params.order" }}

{{ .Title }}

diff --git a/layouts/shortcodes/releasenotes.html b/layouts/shortcodes/releasenotes.html index 72c3346ba..5b95494fa 100644 --- a/layouts/shortcodes/releasenotes.html +++ b/layouts/shortcodes/releasenotes.html @@ -1,5 +1,5 @@ -{{ $tools := .Site.GetPage "/release-notes" }} +{{ $tools := .Site.GetPage "/covidcast/release-notes" }} {{ range sort ($tools.Resources.ByType "page") "PublishDate" "desc" }}

{{ .Title}} {{ .PublishDate.Format "Monday, January 2, 2006" }}

{{ .Content }} From ea6cc9500ae7f35105b854e03ba8bf3c15928e9b Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Mon, 16 Nov 2020 15:09:01 -0500 Subject: [PATCH 03/17] feat: install covidcast from package/branch --- config.toml | 2 +- package-lock.json | 7 +++++++ package.json | 7 +++++-- static/covidcast/.gitignore | 4 ++++ themes/delphi/assets/js/main.js | 4 ++-- 5 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 static/covidcast/.gitignore diff --git a/config.toml b/config.toml index c5427af6c..b3d7d51ee 100644 --- a/config.toml +++ b/config.toml @@ -17,7 +17,7 @@ relativeURLs = false weight = 1 [[menu.main]] name = "COVIDcast" - url = "https://covidcast.cmu.edu" + url = "/covidcast" weight = 2 [[menu.main]] name = "Data" diff --git a/package-lock.json b/package-lock.json index 71e34680e..5bf51f4bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1590,6 +1590,13 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "www-covidcast": { + "version": "github:cmu-delphi/www-covidcast#1ffe01fd32e8537fbddd5f3093db182994d16ab6", + "from": "github:cmu-delphi/www-covidcast#sgratzl/uikit_deploy", + "requires": { + "uikit": "^3.5.9" + } + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index b47649b81..82c74e0bc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "dependencies": { "highlight.js": "^10.3.2", "katex": "^0.12.0", - "uikit": "^3.5.9" + "uikit": "^3.5.9", + "www-covidcast": "github:cmu-delphi/www-covidcast#sgratzl/uikit_deploy" }, "devDependencies": { "hugo-bin": "^0.66.2", @@ -12,7 +13,9 @@ "buildTags": "extended" }, "scripts": { - "postinstall": "ncp node_modules/katex/dist/fonts themes/delphi/static/css/fonts/", + "copy_fonts": "ncp node_modules/katex/dist/fonts themes/delphi/static/css/fonts/", + "copy_covidcast": "ncp node_modules/www-covidcast/public static/covidcast/", + "postinstall": "npm run copy_fonts && npm run copy_covidcast", "build:blog": "Rscript -e \"blogdown::build_site(local=FALSE, run_hugo=FALSE, build_rmd=TRUE)\"", "build": "hugo --gc --minify", "start": "hugo server -D", diff --git a/static/covidcast/.gitignore b/static/covidcast/.gitignore new file mode 100644 index 000000000..8b42cac9a --- /dev/null +++ b/static/covidcast/.gitignore @@ -0,0 +1,4 @@ +*.js +*.txt +*.html +*.css \ No newline at end of file diff --git a/themes/delphi/assets/js/main.js b/themes/delphi/assets/js/main.js index 713b37043..409ac6b7c 100644 --- a/themes/delphi/assets/js/main.js +++ b/themes/delphi/assets/js/main.js @@ -1,5 +1,5 @@ -import UIkit from '../uikit/dist/js/uikit.js'; -import plugin from '../uikit/dist/js/uikit-icons.js'; +import UIkit from 'uikit/dist/js/uikit.js'; +import plugin from 'uikit/dist/js/uikit-icons.js'; UIkit.use(plugin); From bb8886eff620a1e94458d5aeb1dd4a2d065c43a7 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Mon, 16 Nov 2020 15:26:32 -0500 Subject: [PATCH 04/17] build: reduce build size by ignoring not needed files --- config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.toml b/config.toml index b3d7d51ee..18b2c8864 100644 --- a/config.toml +++ b/config.toml @@ -3,7 +3,7 @@ languageCode = "en-us" title = "The Delphi Team" theme = "delphi" googleAnalytics = "UA-88748454-1" -ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_cache$", "\\.knit\\.md$", "\\.utf8\\.md$"] +ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_cache$", "\\.knit\\.md$", "\\.utf8\\.md$", "\\.rda$"] disqusShortname = "" relativeURLs = false From 8a3ef0e780a11d4742e7987812706219870777b2 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Mon, 16 Nov 2020 15:34:17 -0500 Subject: [PATCH 05/17] build: enforce npm install --- netlify.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index a6954b92e..33a481fdc 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,20 +1,20 @@ [build] publish = "public" -command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" +command = "npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.production.environment] HUGO_VERSION = "0.78.0" HUGO_ENV = "production" [context.deploy-preview] -command = "hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL" +command = "npm ci && hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] HUGO_VERSION = "0.78.0" HUGO_ENABLEGITINFO = "true" [context.branch-deploy] -command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" +command = "npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] HUGO_VERSION = "0.78.0" From 099866290ab44bf9c7bf9fa47d74ef2c715cb371 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Mon, 16 Nov 2020 15:43:44 -0500 Subject: [PATCH 06/17] build: dummy change to trigger build --- content/covidcast/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/covidcast/_index.md b/content/covidcast/_index.md index 15736f638..2889d6bb1 100644 --- a/content/covidcast/_index.md +++ b/content/covidcast/_index.md @@ -10,4 +10,5 @@ styles: - ./covidcast/styles.css --- + {{}} \ No newline at end of file From 8c94094e8e856b992e4a2e922a710eaf90077190 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Mon, 16 Nov 2020 15:58:39 -0500 Subject: [PATCH 07/17] build: invalidate netlify www-covidcast cache --- netlify.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index 33a481fdc..a7602b8e6 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,20 +1,20 @@ [build] publish = "public" -command = "npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" +command = "rm -rf node_modules/www-covidcast && npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.production.environment] HUGO_VERSION = "0.78.0" HUGO_ENV = "production" [context.deploy-preview] -command = "npm ci && hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL" +command = "rm -rf node_modules/www-covidcast && npm ci && hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] HUGO_VERSION = "0.78.0" HUGO_ENABLEGITINFO = "true" [context.branch-deploy] -command = "npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" +command = "rm -rf node_modules/www-covidcast && npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] HUGO_VERSION = "0.78.0" From c14071540f09774bd890bc753972d905e3f1cc46 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Mon, 16 Nov 2020 16:06:03 -0500 Subject: [PATCH 08/17] build: fix hash reference --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 5bf51f4bc..61ecef595 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1591,7 +1591,7 @@ "dev": true }, "www-covidcast": { - "version": "github:cmu-delphi/www-covidcast#1ffe01fd32e8537fbddd5f3093db182994d16ab6", + "version": "github:cmu-delphi/www-covidcast#7a5af5713f6c4c76960ff8458d5c3a24af566fd2", "from": "github:cmu-delphi/www-covidcast#sgratzl/uikit_deploy", "requires": { "uikit": "^3.5.9" From 56e835552ca81f9a19eabb60473129edb5910056 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Mon, 16 Nov 2020 16:20:42 -0500 Subject: [PATCH 09/17] build: trigger build --- netlify.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index a7602b8e6..33a481fdc 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,20 +1,20 @@ [build] publish = "public" -command = "rm -rf node_modules/www-covidcast && npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" +command = "npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.production.environment] HUGO_VERSION = "0.78.0" HUGO_ENV = "production" [context.deploy-preview] -command = "rm -rf node_modules/www-covidcast && npm ci && hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL" +command = "npm ci && hugo --gc --minify --buildDrafts --buildFuture -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] HUGO_VERSION = "0.78.0" HUGO_ENABLEGITINFO = "true" [context.branch-deploy] -command = "rm -rf node_modules/www-covidcast && npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" +command = "npm ci && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] HUGO_VERSION = "0.78.0" From e9821bba690717cbbe168938c12d0153ffa51916 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Tue, 17 Nov 2020 11:09:18 -0500 Subject: [PATCH 10/17] feat: switch to other covidcast branch --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61ecef595..6ecd6ca57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1591,8 +1591,8 @@ "dev": true }, "www-covidcast": { - "version": "github:cmu-delphi/www-covidcast#7a5af5713f6c4c76960ff8458d5c3a24af566fd2", - "from": "github:cmu-delphi/www-covidcast#sgratzl/uikit_deploy", + "version": "github:cmu-delphi/www-covidcast#da4d6de98519414a8116e258b633c86b12f66e84", + "from": "github:cmu-delphi/www-covidcast#sgratzl/package", "requires": { "uikit": "^3.5.9" } diff --git a/package.json b/package.json index 82c74e0bc..ee91975c6 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "highlight.js": "^10.3.2", "katex": "^0.12.0", "uikit": "^3.5.9", - "www-covidcast": "github:cmu-delphi/www-covidcast#sgratzl/uikit_deploy" + "www-covidcast": "github:cmu-delphi/www-covidcast#sgratzl/package" }, "devDependencies": { "hugo-bin": "^0.66.2", From d310a7eccc581f8e03adefe64e1f8dbdad19533c Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Tue, 17 Nov 2020 17:07:26 -0500 Subject: [PATCH 11/17] refactor: restructure content to reflect structure --- content/{about.md => about/_index.md} | 1 + content/{ => about}/team.md | 0 content/covidcast/_index.md | 6 ++++++ content/{ => covidcast}/indicators/cases.md | 0 content/{ => covidcast}/indicators/combined.md | 0 content/{ => covidcast}/indicators/deaths.md | 0 content/{ => covidcast}/indicators/doctor-visits.md | 0 content/{ => covidcast}/indicators/google-trends.md | 0 content/{ => covidcast}/indicators/hospital-admissions.md | 0 content/{ => covidcast}/indicators/index.md | 0 content/{ => covidcast}/indicators/quidel-flu.md | 0 content/{ => covidcast}/indicators/quidel.md | 0 content/{ => covidcast}/indicators/safegraph.md | 0 content/{ => covidcast}/indicators/survey-google.md | 0 content/{ => covidcast}/indicators/symptoms-community-fb.md | 0 content/{ => covidcast}/indicators/symptoms-fb.md | 0 content/{ => covidcast}/methodology.md | 0 content/{ => covidcast}/release-notes/index.md | 0 content/{ => covidcast}/release-notes/v1.0.md | 0 content/{ => covidcast}/release-notes/v1.1.md | 0 content/{ => covidcast}/release-notes/v1.10.0.md | 0 content/{ => covidcast}/release-notes/v1.2.1.md | 0 content/{ => covidcast}/release-notes/v1.2.md | 0 content/{ => covidcast}/release-notes/v1.3.md | 0 content/{ => covidcast}/release-notes/v1.4.1.md | 0 content/{ => covidcast}/release-notes/v1.4.md | 0 content/{ => covidcast}/release-notes/v1.5.md | 0 content/{ => covidcast}/release-notes/v1.6.md | 0 content/{ => covidcast}/release-notes/v1.7.md | 0 content/{ => covidcast}/release-notes/v1.8.md | 0 content/{ => covidcast}/release-notes/v1.9.2.md | 0 content/{ => covidcast}/release-notes/v1.9.3.md | 0 content/{ => covidcast}/release-notes/v1.9.md | 0 content/{ => covidcast}/surveys.md | 0 content/{ => covidcast}/terms-of-use.md | 0 35 files changed, 7 insertions(+) rename content/{about.md => about/_index.md} (98%) rename content/{ => about}/team.md (100%) create mode 100644 content/covidcast/_index.md rename content/{ => covidcast}/indicators/cases.md (100%) rename content/{ => covidcast}/indicators/combined.md (100%) rename content/{ => covidcast}/indicators/deaths.md (100%) rename content/{ => covidcast}/indicators/doctor-visits.md (100%) rename content/{ => covidcast}/indicators/google-trends.md (100%) rename content/{ => covidcast}/indicators/hospital-admissions.md (100%) rename content/{ => covidcast}/indicators/index.md (100%) rename content/{ => covidcast}/indicators/quidel-flu.md (100%) rename content/{ => covidcast}/indicators/quidel.md (100%) rename content/{ => covidcast}/indicators/safegraph.md (100%) rename content/{ => covidcast}/indicators/survey-google.md (100%) rename content/{ => covidcast}/indicators/symptoms-community-fb.md (100%) rename content/{ => covidcast}/indicators/symptoms-fb.md (100%) rename content/{ => covidcast}/methodology.md (100%) rename content/{ => covidcast}/release-notes/index.md (100%) rename content/{ => covidcast}/release-notes/v1.0.md (100%) rename content/{ => covidcast}/release-notes/v1.1.md (100%) rename content/{ => covidcast}/release-notes/v1.10.0.md (100%) rename content/{ => covidcast}/release-notes/v1.2.1.md (100%) rename content/{ => covidcast}/release-notes/v1.2.md (100%) rename content/{ => covidcast}/release-notes/v1.3.md (100%) rename content/{ => covidcast}/release-notes/v1.4.1.md (100%) rename content/{ => covidcast}/release-notes/v1.4.md (100%) rename content/{ => covidcast}/release-notes/v1.5.md (100%) rename content/{ => covidcast}/release-notes/v1.6.md (100%) rename content/{ => covidcast}/release-notes/v1.7.md (100%) rename content/{ => covidcast}/release-notes/v1.8.md (100%) rename content/{ => covidcast}/release-notes/v1.9.2.md (100%) rename content/{ => covidcast}/release-notes/v1.9.3.md (100%) rename content/{ => covidcast}/release-notes/v1.9.md (100%) rename content/{ => covidcast}/surveys.md (100%) rename content/{ => covidcast}/terms-of-use.md (100%) diff --git a/content/about.md b/content/about/_index.md similarity index 98% rename from content/about.md rename to content/about/_index.md index b5c3f9285..c5267d2a4 100644 --- a/content/about.md +++ b/content/about/_index.md @@ -1,6 +1,7 @@ --- date: "2020-07-28" title: About +layout: single --- In March 2020, the [Delphi group](https://delphi.cmu.edu) at Carnegie Mellon diff --git a/content/team.md b/content/about/team.md similarity index 100% rename from content/team.md rename to content/about/team.md diff --git a/content/covidcast/_index.md b/content/covidcast/_index.md new file mode 100644 index 000000000..adc3fbb2b --- /dev/null +++ b/content/covidcast/_index.md @@ -0,0 +1,6 @@ +--- +title: COVIDCast +layout: single +--- + +Test \ No newline at end of file diff --git a/content/indicators/cases.md b/content/covidcast/indicators/cases.md similarity index 100% rename from content/indicators/cases.md rename to content/covidcast/indicators/cases.md diff --git a/content/indicators/combined.md b/content/covidcast/indicators/combined.md similarity index 100% rename from content/indicators/combined.md rename to content/covidcast/indicators/combined.md diff --git a/content/indicators/deaths.md b/content/covidcast/indicators/deaths.md similarity index 100% rename from content/indicators/deaths.md rename to content/covidcast/indicators/deaths.md diff --git a/content/indicators/doctor-visits.md b/content/covidcast/indicators/doctor-visits.md similarity index 100% rename from content/indicators/doctor-visits.md rename to content/covidcast/indicators/doctor-visits.md diff --git a/content/indicators/google-trends.md b/content/covidcast/indicators/google-trends.md similarity index 100% rename from content/indicators/google-trends.md rename to content/covidcast/indicators/google-trends.md diff --git a/content/indicators/hospital-admissions.md b/content/covidcast/indicators/hospital-admissions.md similarity index 100% rename from content/indicators/hospital-admissions.md rename to content/covidcast/indicators/hospital-admissions.md diff --git a/content/indicators/index.md b/content/covidcast/indicators/index.md similarity index 100% rename from content/indicators/index.md rename to content/covidcast/indicators/index.md diff --git a/content/indicators/quidel-flu.md b/content/covidcast/indicators/quidel-flu.md similarity index 100% rename from content/indicators/quidel-flu.md rename to content/covidcast/indicators/quidel-flu.md diff --git a/content/indicators/quidel.md b/content/covidcast/indicators/quidel.md similarity index 100% rename from content/indicators/quidel.md rename to content/covidcast/indicators/quidel.md diff --git a/content/indicators/safegraph.md b/content/covidcast/indicators/safegraph.md similarity index 100% rename from content/indicators/safegraph.md rename to content/covidcast/indicators/safegraph.md diff --git a/content/indicators/survey-google.md b/content/covidcast/indicators/survey-google.md similarity index 100% rename from content/indicators/survey-google.md rename to content/covidcast/indicators/survey-google.md diff --git a/content/indicators/symptoms-community-fb.md b/content/covidcast/indicators/symptoms-community-fb.md similarity index 100% rename from content/indicators/symptoms-community-fb.md rename to content/covidcast/indicators/symptoms-community-fb.md diff --git a/content/indicators/symptoms-fb.md b/content/covidcast/indicators/symptoms-fb.md similarity index 100% rename from content/indicators/symptoms-fb.md rename to content/covidcast/indicators/symptoms-fb.md diff --git a/content/methodology.md b/content/covidcast/methodology.md similarity index 100% rename from content/methodology.md rename to content/covidcast/methodology.md diff --git a/content/release-notes/index.md b/content/covidcast/release-notes/index.md similarity index 100% rename from content/release-notes/index.md rename to content/covidcast/release-notes/index.md diff --git a/content/release-notes/v1.0.md b/content/covidcast/release-notes/v1.0.md similarity index 100% rename from content/release-notes/v1.0.md rename to content/covidcast/release-notes/v1.0.md diff --git a/content/release-notes/v1.1.md b/content/covidcast/release-notes/v1.1.md similarity index 100% rename from content/release-notes/v1.1.md rename to content/covidcast/release-notes/v1.1.md diff --git a/content/release-notes/v1.10.0.md b/content/covidcast/release-notes/v1.10.0.md similarity index 100% rename from content/release-notes/v1.10.0.md rename to content/covidcast/release-notes/v1.10.0.md diff --git a/content/release-notes/v1.2.1.md b/content/covidcast/release-notes/v1.2.1.md similarity index 100% rename from content/release-notes/v1.2.1.md rename to content/covidcast/release-notes/v1.2.1.md diff --git a/content/release-notes/v1.2.md b/content/covidcast/release-notes/v1.2.md similarity index 100% rename from content/release-notes/v1.2.md rename to content/covidcast/release-notes/v1.2.md diff --git a/content/release-notes/v1.3.md b/content/covidcast/release-notes/v1.3.md similarity index 100% rename from content/release-notes/v1.3.md rename to content/covidcast/release-notes/v1.3.md diff --git a/content/release-notes/v1.4.1.md b/content/covidcast/release-notes/v1.4.1.md similarity index 100% rename from content/release-notes/v1.4.1.md rename to content/covidcast/release-notes/v1.4.1.md diff --git a/content/release-notes/v1.4.md b/content/covidcast/release-notes/v1.4.md similarity index 100% rename from content/release-notes/v1.4.md rename to content/covidcast/release-notes/v1.4.md diff --git a/content/release-notes/v1.5.md b/content/covidcast/release-notes/v1.5.md similarity index 100% rename from content/release-notes/v1.5.md rename to content/covidcast/release-notes/v1.5.md diff --git a/content/release-notes/v1.6.md b/content/covidcast/release-notes/v1.6.md similarity index 100% rename from content/release-notes/v1.6.md rename to content/covidcast/release-notes/v1.6.md diff --git a/content/release-notes/v1.7.md b/content/covidcast/release-notes/v1.7.md similarity index 100% rename from content/release-notes/v1.7.md rename to content/covidcast/release-notes/v1.7.md diff --git a/content/release-notes/v1.8.md b/content/covidcast/release-notes/v1.8.md similarity index 100% rename from content/release-notes/v1.8.md rename to content/covidcast/release-notes/v1.8.md diff --git a/content/release-notes/v1.9.2.md b/content/covidcast/release-notes/v1.9.2.md similarity index 100% rename from content/release-notes/v1.9.2.md rename to content/covidcast/release-notes/v1.9.2.md diff --git a/content/release-notes/v1.9.3.md b/content/covidcast/release-notes/v1.9.3.md similarity index 100% rename from content/release-notes/v1.9.3.md rename to content/covidcast/release-notes/v1.9.3.md diff --git a/content/release-notes/v1.9.md b/content/covidcast/release-notes/v1.9.md similarity index 100% rename from content/release-notes/v1.9.md rename to content/covidcast/release-notes/v1.9.md diff --git a/content/surveys.md b/content/covidcast/surveys.md similarity index 100% rename from content/surveys.md rename to content/covidcast/surveys.md diff --git a/content/terms-of-use.md b/content/covidcast/terms-of-use.md similarity index 100% rename from content/terms-of-use.md rename to content/covidcast/terms-of-use.md From 9a8a65a5f25532e3dbec8424a0e22e93434551af Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Tue, 17 Nov 2020 17:08:49 -0500 Subject: [PATCH 12/17] refactor: use ref for links --- config.toml | 5 ++- layouts/shortcodes/indicators.html | 2 +- layouts/shortcodes/releasenotes.html | 2 +- themes/delphi/layouts/blog/baseof.html | 2 +- .../layouts/partials/delphi-text-logo.html | 2 +- .../delphi/layouts/partials/footer/blog.html | 2 +- .../layouts/partials/footer/desktop.html | 18 +++++------ .../layouts/partials/footer/footer.html | 5 ++- .../layouts/partials/footer/methods.html | 2 +- .../layouts/partials/footer/mobile.html | 18 +++++------ .../layouts/partials/footer/surveys.html | 2 +- .../delphi/layouts/partials/footer/terms.html | 2 +- themes/delphi/layouts/partials/nav.html | 32 ++----------------- 13 files changed, 35 insertions(+), 59 deletions(-) diff --git a/config.toml b/config.toml index 83505f9e7..658246e77 100644 --- a/config.toml +++ b/config.toml @@ -16,27 +16,30 @@ relativeURLs = false post = "angle-down" weight = 1 [[menu.main]] - identifier = "team" parent = "about" name = "Team" url = "/about/team" weight = 1 [[menu.main]] + identifier = "covidcast" name = "COVIDcast" pre = "map" url = "/covidcast" weight = 2 [[menu.main]] + identifier = "blog" name = "Blog" pre = "blog" url = "/blog" weight = 3 [[menu.main]] + identifier = "github" name = "GitHub" pre = "github" url = "https://github.com/cmu-delphi/" weight = 4 [[menu.main]] + identifier = "api" name = "API" pre = "api" url = "https://cmu-delphi.github.io/delphi-epidata/" diff --git a/layouts/shortcodes/indicators.html b/layouts/shortcodes/indicators.html index 114db7bee..df6c2c47f 100644 --- a/layouts/shortcodes/indicators.html +++ b/layouts/shortcodes/indicators.html @@ -1,6 +1,6 @@
-{{ $tools := .Site.GetPage "/indicators" }} +{{ $tools := .Site.GetPage "/covidcast/indicators" }} {{ range sort (where ($tools.Resources.ByType "page") ".Params.category" "eq" (.Get "category")) ".Params.order" }}

{{ .Title }}

diff --git a/layouts/shortcodes/releasenotes.html b/layouts/shortcodes/releasenotes.html index 72c3346ba..5b95494fa 100644 --- a/layouts/shortcodes/releasenotes.html +++ b/layouts/shortcodes/releasenotes.html @@ -1,5 +1,5 @@ -{{ $tools := .Site.GetPage "/release-notes" }} +{{ $tools := .Site.GetPage "/covidcast/release-notes" }} {{ range sort ($tools.Resources.ByType "page") "PublishDate" "desc" }}

{{ .Title}} {{ .PublishDate.Format "Monday, January 2, 2006" }}

{{ .Content }} diff --git a/themes/delphi/layouts/blog/baseof.html b/themes/delphi/layouts/blog/baseof.html index e909ea26b..190dda20a 100644 --- a/themes/delphi/layouts/blog/baseof.html +++ b/themes/delphi/layouts/blog/baseof.html @@ -8,6 +8,6 @@ {{ block "main" . }} {{ end }} - {{ partial "footer.html" . }} + {{ partial "footer/footer.html" . }} diff --git a/themes/delphi/layouts/partials/delphi-text-logo.html b/themes/delphi/layouts/partials/delphi-text-logo.html index c07b2612a..e93dfd158 100644 --- a/themes/delphi/layouts/partials/delphi-text-logo.html +++ b/themes/delphi/layouts/partials/delphi-text-logo.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/themes/delphi/layouts/partials/footer/blog.html b/themes/delphi/layouts/partials/footer/blog.html index 8e3a16e96..564b68c2d 100644 --- a/themes/delphi/layouts/partials/footer/blog.html +++ b/themes/delphi/layouts/partials/footer/blog.html @@ -1 +1 @@ -Blog \ No newline at end of file +Blog \ No newline at end of file diff --git a/themes/delphi/layouts/partials/footer/desktop.html b/themes/delphi/layouts/partials/footer/desktop.html index 1d8f76c2f..64ebfc4ba 100644 --- a/themes/delphi/layouts/partials/footer/desktop.html +++ b/themes/delphi/layouts/partials/footer/desktop.html @@ -3,7 +3,7 @@ - {{partial "delphi-text-logo.html"}} + {{partial "delphi-text-logo.html" . }} COVIDcast Resources @@ -14,25 +14,25 @@ - {{partial "footer/methods.html"}} - {{partial "footer/cmu.html"}} - {{partial "footer/twitter.html"}} + {{partial "footer/methods.html" .}} + {{partial "footer/cmu.html" . }} + {{partial "footer/twitter.html" . }} - {{partial "footer/surveys.html"}} - {{partial "footer/api.html"}} - {{partial "footer/terms.html"}} + {{partial "footer/surveys.html" . }} + {{partial "footer/api.html" . }} + {{partial "footer/terms.html" . }} - {{partial "footer/github.html"}} + {{partial "footer/github.html" . }} - {{partial "footer/blog.html"}} + {{partial "footer/blog.html" . }} diff --git a/themes/delphi/layouts/partials/footer/footer.html b/themes/delphi/layouts/partials/footer/footer.html index ddb860fd2..e120ce649 100644 --- a/themes/delphi/layouts/partials/footer/footer.html +++ b/themes/delphi/layouts/partials/footer/footer.html @@ -1,7 +1,6 @@