Skip to content

Apache DataFusion SQL Query Engine

ARROW-6066: [Website] Fix blog post author header

Neal Richardsonb83d6e0e317b
diff --git a/site/README.md b/site/README.md
index 33758e9e3f..651b013c51 100644
--- a/site/README.md
+++ b/site/README.md
@@ -26,6 +26,10 @@ format. [Jekyll](https://jekyllrb.com/) is used to generate HTML files that can
then be committed to the [arrow-site](https://github.com/apache/arrow-site)
repository.
+## Adding Content
+
+To add a blog post, create a new markdown file in the `_posts` directory, following the model of existing posts. In the front matter, you should specify an "author". This should be your Apache ID if you have one, or it can just be your name. To add additional metadata about yourself (GitHub ID, website), add yourself to `_data/contributors.yml`. This object is keyed by `apacheId`, so use that as the `author` in your post. (It doesn't matter if the ID actually exists in the ASF; all metadata is local to this project.)
+
## Prerequisites
With Ruby >= 2.1 installed, run the following commands to install
diff --git a/site/_data/contributors.yml b/site/_data/contributors.yml
index 185a565abf..3d86a48f4e 100644
--- a/site/_data/contributors.yml
+++ b/site/_data/contributors.yml
@@ -16,9 +16,6 @@
# Database of contributors to Apache Arrow (WIP)
# Blogs and other pages use this data
#
-- name: Apache Arrow Community
- githubId: apache
- homepage: https://arrow.apache.org
- name: Wes McKinney
apacheId: wesm
githubId: wesm
@@ -43,8 +40,8 @@
apacheId: siddharthteotia
githubId: siddharthteotia
- name: The Apache Arrow PMC
- apacheId: pmc
- githubId: pmc
+ apacheId: pmc # Not a real apacheId
+ homepage: https://arrow.apache.org
- name: Andy Grove
apacheId: agrove
githubId: andygrove
diff --git a/site/_docs/c_glib/index.md b/site/_docs/c_glib/index.md
index e92788b829..d232d88aa8 100644
--- a/site/_docs/c_glib/index.md
+++ b/site/_docs/c_glib/index.md
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: default
title: Apache Arrow GLib (C)
permalink: /docs/c_glib/index.html
---
diff --git a/site/_includes/blog_contents.html b/site/_includes/blog_contents.html
deleted file mode 100644
index b3b785d431..0000000000
--- a/site/_includes/blog_contents.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<div>
- <aside>
- <h4>Posts</h4>
- <ul>
- {% for post in site.posts %}
- <li class="{% if page.title == post.title %}current{% endif %}">
- <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
- </li>
- {% endfor %}
- </ul>
- </aside>
-</div>
diff --git a/site/_includes/blog_entry.html b/site/_includes/blog_entry.html
index f6276d3ac1..65ec138014 100644
--- a/site/_includes/blog_entry.html
+++ b/site/_includes/blog_entry.html
@@ -15,37 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
<div class="blog-post" style="margin-bottom: 4rem">
- <h1>
- {{ post.title }}
- <a href="{{ post.url }}" class="permalink" title="Permalink">∞</a>
- </h1>
-
- {% capture discard %}
- {% for c in site.data.contributors %}
- {% if c.apacheId == post.author %}
- {% assign author_name = c.name %}
- {% if c.homepage %}
- {% assign homepage = c.homepage %}
- {% else %}
- {% capture homepage %}http://github.com/{{ c.githubId }}{% endcapture %}
- {% endif %}
- {% if c.avatar %}
- {% assign avatar = c.avatar %}
- {% else %}
- {% capture avatar %}http://github.com/{{ c.githubId }}.png{% endcapture %}
- {% endif %}
- {% endif %}
- {% endfor %}
- {% endcapture %}{% assign discard = nil %}
-
- <p>
- <span class="badge badge-secondary">Published</span>
- <span class="published">
- {{ post.date | date_to_string }}
- </span>
- <br />
- <span class="badge badge-secondary">By</span>
- <a href="{{ homepage }}">{{ author_name }} ({{ post.author }})</a>
- </p>
+ {% include blog_header.html %}
{{ post.content }}
</div>
diff --git a/site/_includes/blog_header.html b/site/_includes/blog_header.html
new file mode 100644
index 0000000000..a5a1bacd4e
--- /dev/null
+++ b/site/_includes/blog_header.html
@@ -0,0 +1,59 @@
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+<h1>
+ {{ post.title }}
+ <a href="{{ post.url }}" class="permalink" title="Permalink">∞</a>
+</h1>
+
+{% capture discard %}
+ {% comment %}
+ We have to initialize the author_name to nil so that when this _include
+ is used in a for loop, the previous entry doesn't contaminate
+ {% endcomment %}
+ {% assign author_name = nil %}
+ {% for c in site.data.contributors %}
+ {% if c.apacheId == post.author %}
+ {% assign author_name = c.name %}
+ {% if c.homepage %}
+ {% assign homepage = c.homepage %}
+ {% else if c.githubId %}
+ {% capture homepage %}http://github.com/{{ c.githubId }}{% endcapture %}
+ {% else %}
+ {% capture homepage %}http://people.apache.org/~{{ post.author }}{% endcapture %}
+ {% endif %}
+ {% if c.avatar %}
+ {% assign avatar = c.avatar %}
+ {% else %}
+ {% capture avatar %}http://github.com/{{ c.githubId }}.png{% endcapture %}
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+{% endcapture %}{% assign discard = nil %}
+
+<p>
+ <span class="badge badge-secondary">Published</span>
+ <span class="published">
+ {{ post.date | date_to_string }}
+ </span>
+ <br />
+ <span class="badge badge-secondary">By</span>
+ {% if author_name %}
+ <a href="{{ homepage }}">{{ author_name }} ({{ post.author }}) </a>
+ {% else %}
+ {{ post.author }}
+ {% endif %}
+</p>
diff --git a/site/_layouts/blog.html b/site/_layouts/blog.html
deleted file mode 100644
index 31fd7195ef..0000000000
--- a/site/_layouts/blog.html
+++ /dev/null
@@ -1,15 +0,0 @@
----
-layout: default
----
-
-<section class="blog">
- <div class="grid">
-
- <div class="">
- {{ content }}
- </div>
-
- <!-- {% include blog_contents.html %} -->
- <div class="clear"></div>
- </div>
-</section>
diff --git a/site/_layouts/docs.html b/site/_layouts/docs.html
deleted file mode 100644
index 65ce34547c..0000000000
--- a/site/_layouts/docs.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% include top.html %}
-
-<body class="wrap">
- <header>
- {% include header.html %}
- </header>
-
- <div class="container p-lg-4">
- <main role="main">
- {{ content }}
- </main>
-
- {% include footer.html %}
- </div>
-</body>
-</html>
-
diff --git a/site/_layouts/post.html b/site/_layouts/post.html
index bc00bd9dc4..1e9db93589 100644
--- a/site/_layouts/post.html
+++ b/site/_layouts/post.html
@@ -1,5 +1,4 @@
{% include top.html %}
-{% capture homepage %}http://people.apache.org/~{{ page.author }}{% endcapture %}
<body class="wrap">
<header>
@@ -8,39 +7,11 @@
<div class="container p-lg-4">
<main role="main">
-
- <h1>
- {{ page.title }}
- <a href="{{ page.url }}" class="permalink" title="Permalink">∞</a>
- </h1>
-
- {% capture discard %}
- {% for c in site.data.contributors %}
- {% if c.apacheId == page.author %}
- {% assign author_name = c.name %}
- {% if c.homepage %}
- {% assign homepage = c.homepage %}
- {% else %}
- {% capture homepage %}http://github.com/{{ c.githubId }}{% endcapture %}
- {% endif %}
- {% if c.avatar %}
- {% assign avatar = c.avatar %}
- {% else %}
- {% capture avatar %}http://github.com/{{ c.githubId }}.png{% endcapture %}
- {% endif %}
- {% endif %}
- {% endfor %}
- {% endcapture %}{% assign discard = nil %}
-
- <p>
- <span class="badge badge-secondary">Published</span>
- <span class="published">
- {{ page.date | date_to_string }}
- </span>
- <br />
- <span class="badge badge-secondary">By</span>
- <a href="{{ homepage }}">{{ author_name }} ({{ post.author }})</a>
- </p>
+ {% comment %}
+ This 'assign' is to match the variable name used in _includes/blog_header.html
+ {% endcomment %}
+ {% assign post = page %}
+ {% include blog_header.html %}
{{ content }}
</main>
diff --git a/site/_posts/2019-01-25-r-spark-improvements.md b/site/_posts/2019-01-25-r-spark-improvements.md
index 982514ab6a..a06d7aa063 100644
--- a/site/_posts/2019-01-25-r-spark-improvements.md
+++ b/site/_posts/2019-01-25-r-spark-improvements.md
@@ -2,7 +2,7 @@
layout: post
title: "Speeding up R and Apache Spark using Apache Arrow"
date: "2019-01-25 00:00:00 -0600"
-author: javierluraschi
+author: Javier Luraschi
categories: [application]
---
<!--
diff --git a/site/_posts/2019-07-08-0.14.0-release.md b/site/_posts/2019-07-08-0.14.0-release.md
index 1c1f1c8a62..bd857051fa 100644
--- a/site/_posts/2019-07-08-0.14.0-release.md
+++ b/site/_posts/2019-07-08-0.14.0-release.md
@@ -2,7 +2,7 @@
layout: post
title: "Apache Arrow 0.14.0 Release"
date: "2019-07-02 00:00:00 -0600"
-author: apache
+author: pmc
categories: [release]
---
<!--
@@ -297,4 +297,4 @@ community there:
[12]: https://lists.apache.org/thread.html/a99124e57c14c3c9ef9d98f3c80cfe1dd25496bf3ff7046778add937@%3Cdev.arrow.apache.org%3E
[13]: https://lists.apache.org/thread.html/96b2e22606e8a7b0ad7dc4aae16f232724d1059b34636676ed971d40@%3Cdev.arrow.apache.org%3E
[14]: https://lists.apache.org/thread.html/82a7c026ad18dbe9fdbcffa3560979aff6fd86dd56a49f40d9cfb46e@%3Cdev.arrow.apache.org%3E
-[15]: https://lists.apache.org/thread.html/44a7a3d256ab5dbd62da6fe45b56951b435697426bf4adedb6520907@%3Cdev.arrow.apache.org%3E
\ No newline at end of file
+[15]: https://lists.apache.org/thread.html/44a7a3d256ab5dbd62da6fe45b56951b435697426bf4adedb6520907@%3Cdev.arrow.apache.org%3E