From d310a7eccc581f8e03adefe64e1f8dbdad19533c Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Tue, 17 Nov 2020 17:07:26 -0500 Subject: [PATCH 01/10] 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 02/10] 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 @@