diff --git a/_config.yml b/_config.yml index d054ecd..a0a99fc 100644 --- a/_config.yml +++ b/_config.yml @@ -14,7 +14,8 @@ locale : "en-US" title : "Open Data Kit" title_separator : "-" name : &name "ODK Community" # &name is a YAML anchor which can be *referenced later -description : &description "Home of Open Data Kit" +description : &description "The Open Data Kit community produces free and open-source software for collecting, managing, and using data in resource-constrained environments." +tagline : The standard for mobile data collection url : "http://staging.opendatakit.org" # the base hostname & protocol for your site e.g. "https://mmistakes.github.io" baseurl : # the subpath of your site, e.g. "/blog" repository : "opendatakit/website" diff --git a/_includes/page__hero.html b/_includes/page__hero.html new file mode 100644 index 0000000..8c01828 --- /dev/null +++ b/_includes/page__hero.html @@ -0,0 +1,61 @@ +{% if page.header.image contains "://" %} + {% capture img_path %}{{ page.header.image }}{% endcapture %} +{% else %} + {% capture img_path %}{{ page.header.image | relative_url }}{% endcapture %} +{% endif %} + +{% if page.header.cta_url contains "://" %} + {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} +{% else %} + {% capture cta_path %}{{ page.header.cta_url | relative_url }}{% endcapture %} +{% endif %} + +{% if page.header.overlay_image contains "://" %} + {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} +{% elsif page.header.overlay_image %} + {% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %} +{% endif %} + +{% if page.header.overlay_filter contains "rgba" %} + {% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %} +{% elsif page.header.overlay_filter %} + {% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %} +{% endif %} + +{% if page.header.image_description %} + {% assign image_description = page.header.image_description %} +{% else %} + {% assign image_description = page.title %} +{% endif %} + +{% assign image_description = image_description | markdownify | strip_html | strip_newlines | escape_once %} + +
\ No newline at end of file diff --git a/_includes/seo.html b/_includes/seo.html new file mode 100644 index 0000000..1cd9718 --- /dev/null +++ b/_includes/seo.html @@ -0,0 +1,166 @@ + +{%- if site.url -%} + {%- assign seo_url = site.url | append: site.baseurl -%} +{%- endif -%} +{%- assign seo_url = seo_url | default: site.github.url -%} + +{% if site.title_separator %} + {% assign title_separator = site.title_separator | default: '-' | replace: '|', '|' %} +{% endif %} + +{%- if page.title -%} + {%- assign seo_title = site.title | append: " " | append: title_separator | append: " " | append: page.title -%} +{%- endif -%} + +{%- if seo_title -%} + {%- assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%} +{%- endif -%} + +{%- assign canonical_url = page.url | replace: "index.html", "" | absolute_url %} + +{%- assign seo_description = page.description | default: page.excerpt | default: site.description -%} +{%- if seo_description -%} + {%- assign seo_description = seo_description | markdownify | strip_html | strip_newlines | escape_once -%} +{%- endif -%} + +{%- assign author = page.author | default: page.authors[0] | default: site:author -%} +{%- assign author = site.data.authors[author] | default: author -%} + +{%- if author.twitter -%} + {%- assign author_twitter = author.twitter | replace: "@", "" -%} +{%- endif -%} + +{%- assign page_large_image = page.header.og_image | default: page.header.overlay_image | default: page.header.image -%} +{%- unless page_large_image contains '://' -%} + {%- assign page_large_image = page_large_image | absolute_url -%} +{%- endunless -%} +{%- assign page_large_image = page_large_image | escape -%} + +{%- assign page_teaser_image = page.header.teaser | default: site.og_image -%} +{%- unless page_teaser_image contains '://' -%} + {%- assign page_teaser_image = page_teaser_image | absolute_url -%} +{%- endunless -%} +{%- assign page_teaser_image = page_teaser_image | escape -%} + +{%- assign site_og_image = site.og_image -%} +{%- unless site_og_image contains '://' -%} + {%- assign site_og_image = site_og_image | absolute_url -%} +{%- endunless -%} +{%- assign site_og_image = site_og_image | escape -%} + +{%- if page.date -%} + {%- assign og_type = "article" -%} +{%- else -%} + {%- assign og_type = "website" -%} +{%- endif -%} + +