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 %} + +
+ {% if page.header.overlay_color or page.header.overlay_image %} +
+

+ {% if paginator and site.paginate_show_page_num %} + {{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %} + {% else %} + {{ site.tagline | default: site.tagline | markdownify | remove: "

" | remove: "

" }} + {% endif %} +

+ {% if page.header.show_overlay_excerpt != false and page.excerpt %} +

{{ page.excerpt | markdownify | remove: "

" | remove: "

" }}

+ {% endif %} + {% if site.read_time and page.read_time %} +

{% include read-time.html %}

+ {% endif %} + {% if page.header.cta_url %} +

{{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}

+ {% endif %} +
+ {% else %} + {{ image_description }} + {% endif %} + {% if page.header.caption %} + {{ page.header.caption | markdownify | remove: "

" | remove: "

" }}
+ {% endif %} +
\ 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 -%} + +{{ seo_title | default: site.title }} + + +{% if author.name %} + +{% endif %} + + + + + + + +{% if page.excerpt %} + +{% endif %} + +{% if page_large_image %} + +{% elsif page_teaser_image %} + +{% endif %} + +{% if site.twitter.username %} + + + + + + {% if page_large_image %} + + + {% else %} + + {% if page_teaser_image %} + + {% endif %} + {% endif %} + + {% if author_twitter %} + + {% endif %} +{% endif %} + +{% if page.date %} + +{% endif %} + +{% if og_type == "article" and page.last_modified_at %} + +{% endif %} + +{% if site.facebook %} + {% if site.facebook.publisher %} + + {% endif %} + + {% if site.facebook.app_id %} + + {% endif %} +{% endif %} + + + +{% if paginator.previous_page %} + +{% endif %} +{% if paginator.next_page %} + +{% endif %} + +{% if site.og_image %} + +{% endif %} + +{% if site.social %} + +{% endif %} + +{% if site.google_site_verification %} + +{% endif %} +{% if site.bing_site_verification %} + +{% endif %} +{% if site.alexa_site_verification %} + +{% endif %} +{% if site.yandex_site_verification %} + +{% endif %} +{% if site.naver-site-verification %} + +{% endif %} + \ No newline at end of file diff --git a/_pages/software/index.md b/_pages/software/index.md index e6d298e..790db9e 100644 --- a/_pages/software/index.md +++ b/_pages/software/index.md @@ -4,7 +4,6 @@ date: 2018-03-01T00:00:00+00:00 author_profile: false layout: splash permalink: /software/ -excerpt: "Find the right software for your needs and start installing." feature_row: - image_path: /assets/images/odk-collect.jpg alt: "Looking for a simple way to collect data and analyze the results?" diff --git a/index.html b/index.html index 475e378..b304972 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,4 @@ --- -title: "The standard for mobile data collection" layout: splash permalink: / date: 2018-03-01T00:00:00-00:00