diff --git a/_data/post_categories.yml b/_data/post_categories.yml new file mode 100644 index 0000000000..9383366e18 --- /dev/null +++ b/_data/post_categories.yml @@ -0,0 +1,26 @@ +categories: +- name: default-category + image: https://opensearch.org/assets/media/blog-category-images/OpenSearch_WebGraphic_Generic-01.png + secondary: https://opensearch.org/assets/media/blog-category-images/OpenSearch_WebGraphic_Generic-02.png +- name: technical-posts + image: https://opensearch.org/assets/media/blog-category-images/OpenSearch_WebGraphic_Technical-01.png + secondary: https://opensearch.org/assets/media/blog-category-images/OpenSearch_WebGraphic_Technical-02.png + # image: http://127.0.0.1:4000/assets/media/blog-category-images/OpenSearch_WebGraphic_Technical-01.png #for local testing +- name: community + image: https://opensearch.org/assets/media/blog-category-images/OpenSearch_WebGraphic_Community-01.png + secondary: https://opensearch.org/assets/media/blog-category-images/OpenSearch_WebGraphic_Community-02.png +- name: releases + image: https://opensearch.org/assets/media/blog-category-images/OpenSearch_WebGraphic_Release-01.png + secondary: https://opensearch.org/assets/media/blog-category-images/OpenSearch_WebGraphic_Release-02.png +- name: partners + image: "" +- name: feature + image: "" +- name: intro + image: "" +- name: community-updates + image: "" +- name: events + image: "" +- name: odfe-updates + image: "" \ No newline at end of file diff --git a/_includes/head-twitter-metatags.html b/_includes/head-twitter-metatags.html new file mode 100644 index 0000000000..149315b2e4 --- /dev/null +++ b/_includes/head-twitter-metatags.html @@ -0,0 +1,129 @@ + + + + + {% feed_meta %} + {% assign pagetitle = page.title | strip_newlines %} + {% if pagetitle != "" %} {{ page.title | append: " ·" }} {% endif %} OpenSearch + + {% if page.has_science_table %} + {%- include science-table-styles.html -%} + {% endif %} + + + + + {% assign meta_keywords = page.meta_keywords | default: "open-source, search, opensearch" %} + {% assign meta_description = page.excerpt | default:page.description | default:page.meta_description | default: "OpenSearch is a community-driven, Apache 2.0-licensed open source search and analytics suite that makes it easy to ingest, search, visualize, and analyze data." %} + {% assign twitter_card_type = "summary_large_image" %} + {% assign twitter_card_title = page.title | default: "OpenSearch"%} + {% assign OpenSearch_twitter_account = "@OpenSearchProj" %} + + + + {% if page.featured_image %} + {% assign twitter_card_image = page.featured_image %} + + {% else %} + + {% if page.categories %} + {% assign category = page.categories | first %} + {% else %} + + {% assign category = "default-category" %} + {% endif %} + + {% assign category_image = "" %} + + + {% for cat in site.data.post_categories.categories %} + {% if cat.name == category %} + {% assign category_image = cat.image %} + {% endif %} + {% endfor %} + + + + + {% if category_image %} + {% assign twitter_card_image = category_image %} + + + {% else %} + {% assign twitter_card_image = "/assets/img/opensearch-twitter-card.png" %} + + {% endif %} + + {% endif %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if page.authors %} + {% assign author_short_name = page.authors | first %} + {% assign author = site.community_members | where: 'short_name', author_short_name | first %} + {% if author.twitter %} + + {% endif %} + {% endif %} + + + + + {{ page.link_rel_tags }} + + + + + + + + + + + + + + {{ page.head_extra }} + + + \ No newline at end of file diff --git a/_includes/head.html b/_includes/head.html index 7828f7a392..0cfdbd21b8 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,86 +1,36 @@ - - - - - - - - - - {% feed_meta %} - - {% if page.meta_description %}{%endif%} - - {% assign pagetitle = page.title | strip_newlines %} - - - - {% if page.twittercard.account %} - - {% elsif page.authors %} - {% assign author_short_name = page.authors | first %} - {% assign author = site.community_members | where: 'short_name', author_short_name | first %} - {% if author.twitter %} - - {% endif %} - {% endif %} - - - - {% if page.twittercard.description %} - - {% else %} - - {% endif %} - {% if page.twittercard.image %} - - {% else %} - - {% endif %} - - - - - {% if page.title %} - {% else %} {% endif %} - - {% if page.image %} - {% else %}{% endif %} - - {{ page.link_rel_tags }} - - - - - - - - - - - - {% if pagetitle != "" %} {{ page.title | append: " ·" }} {% endif %} OpenSearch - - - - {% if page.has_science_table %} - {%- include science-table-styles.html -%} - {% endif %} - - - - - {{ page.head_extra }} - + + + + + {% feed_meta %} + {% assign pagetitle = page.title | strip_newlines %} + {%- include head-twitter-metatags.html -%} + + {% if pagetitle != "" %} {{ page.title | append: " ·" }} {% endif %} OpenSearch + + + {{ page.link_rel_tags }} + + + + + + + + + + {% if page.has_science_table %} + {%- include science-table-styles.html -%} + {% endif %} + + + + + {{ page.head_extra }} + diff --git a/_layouts/default.html b/_layouts/default.html index 83ce948000..6e16bfcd1c 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -3,7 +3,6 @@ --- - {%- include head.html -%} {% if page.layout == 'post' %} {% assign page_type_class = 'page--blog-post' %} @@ -11,6 +10,8 @@ {% assign page_type_class = '' %} {% endif %} + {%- include head.html -%} + {%- include header.html -%} diff --git a/_layouts/post.html b/_layouts/post.html index 579c694c0d..c85e9c6bce 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -4,6 +4,7 @@ has_science_table: false primary_link_url: /blog --- + {% assign primary_title = site.headings.news %} {% assign layout_class = 'sidebar-right' %} {% capture content %} diff --git a/assets/media/blog-category-images/OpenSearch_WebGraphic_Community-01.png b/assets/media/blog-category-images/OpenSearch_WebGraphic_Community-01.png new file mode 100644 index 0000000000..7e18d0a459 Binary files /dev/null and b/assets/media/blog-category-images/OpenSearch_WebGraphic_Community-01.png differ diff --git a/assets/media/blog-category-images/OpenSearch_WebGraphic_Community-02.png b/assets/media/blog-category-images/OpenSearch_WebGraphic_Community-02.png new file mode 100644 index 0000000000..895b909ddd Binary files /dev/null and b/assets/media/blog-category-images/OpenSearch_WebGraphic_Community-02.png differ diff --git a/assets/media/blog-category-images/OpenSearch_WebGraphic_Generic-01.png b/assets/media/blog-category-images/OpenSearch_WebGraphic_Generic-01.png new file mode 100644 index 0000000000..2223e69fba Binary files /dev/null and b/assets/media/blog-category-images/OpenSearch_WebGraphic_Generic-01.png differ diff --git a/assets/media/blog-category-images/OpenSearch_WebGraphic_Generic-02.png b/assets/media/blog-category-images/OpenSearch_WebGraphic_Generic-02.png new file mode 100644 index 0000000000..083e2c1262 Binary files /dev/null and b/assets/media/blog-category-images/OpenSearch_WebGraphic_Generic-02.png differ diff --git a/assets/media/blog-category-images/OpenSearch_WebGraphic_Release-01.png b/assets/media/blog-category-images/OpenSearch_WebGraphic_Release-01.png new file mode 100644 index 0000000000..4bcab5de5c Binary files /dev/null and b/assets/media/blog-category-images/OpenSearch_WebGraphic_Release-01.png differ diff --git a/assets/media/blog-category-images/OpenSearch_WebGraphic_Release-02.png b/assets/media/blog-category-images/OpenSearch_WebGraphic_Release-02.png new file mode 100644 index 0000000000..9c587970c4 Binary files /dev/null and b/assets/media/blog-category-images/OpenSearch_WebGraphic_Release-02.png differ diff --git a/assets/media/blog-category-images/OpenSearch_WebGraphic_Technical-01.png b/assets/media/blog-category-images/OpenSearch_WebGraphic_Technical-01.png new file mode 100644 index 0000000000..90822a954a Binary files /dev/null and b/assets/media/blog-category-images/OpenSearch_WebGraphic_Technical-01.png differ diff --git a/assets/media/blog-category-images/OpenSearch_WebGraphic_Technical-02.png b/assets/media/blog-category-images/OpenSearch_WebGraphic_Technical-02.png new file mode 100644 index 0000000000..6fb7d8f924 Binary files /dev/null and b/assets/media/blog-category-images/OpenSearch_WebGraphic_Technical-02.png differ diff --git a/robots.txt b/robots.txt.tmp similarity index 100% rename from robots.txt rename to robots.txt.tmp