Repository: calcite Updated Branches: refs/heads/master aecd54576 -> 660d083fe
[CALCITE-1229] Restore API and Test API links to site Do not generate spurious spaces when a news item is added. Project: http://git-wip-us.apache.org/repos/asf/calcite/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/0c582435 Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/0c582435 Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/0c582435 Branch: refs/heads/master Commit: 0c58243542677072a7b77555363c6204441c571a Parents: aecd545 Author: Julian Hyde <[email protected]> Authored: Fri Jun 10 18:11:02 2016 -0700 Committer: Julian Hyde <[email protected]> Committed: Mon Jun 13 00:28:28 2016 -0700 ---------------------------------------------------------------------- avatica/site/_includes/docs_ul.html | 3 ++- site/_docs/api.md | 2 +- site/_includes/docs_ul.html | 29 +++++++++++++++++------------ site/_includes/news_contents.html | 8 ++++---- 4 files changed, 24 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite/blob/0c582435/avatica/site/_includes/docs_ul.html ---------------------------------------------------------------------- diff --git a/avatica/site/_includes/docs_ul.html b/avatica/site/_includes/docs_ul.html index 768259c..8181e74 100644 --- a/avatica/site/_includes/docs_ul.html +++ b/avatica/site/_includes/docs_ul.html @@ -4,6 +4,7 @@ {% for item in items %} {% comment %} Account for the baseurl to make sure we compare the full URI. {% endcomment %} {% capture item_url %}{{site.baseurl}}{{ item | prepend:"/docs/" | append:".html" }}{% endcapture %} + {% capture item_url2 %}{{site.baseurl}}{{ item | prepend:"/docs/" | append:"/" }}{% endcapture %} {% capture current_url %}{{ site.baseurl }}{{ page.url }}{% endcapture %} {% if item_url == current_url %} @@ -19,7 +20,7 @@ {% else %} {% assign anchor_text = p.title %} {% endif %} - {% if p_url == item_url %} + {% if p_url == item_url or p_url == item_url2 %} <li class="{{ c }}"><a href="{{ p_url }}">{{ anchor_text }}</a></li> {% break %} {% endif %} http://git-wip-us.apache.org/repos/asf/calcite/blob/0c582435/site/_docs/api.md ---------------------------------------------------------------------- diff --git a/site/_docs/api.md b/site/_docs/api.md index 49f456b..5ad8688 100644 --- a/site/_docs/api.md +++ b/site/_docs/api.md @@ -1,7 +1,7 @@ --- title: API layout: external -external_url: http://calcite.apache.org/apidocs +external_url: /apidocs --- {% comment %} Ideally, we want to use {{ site.apiRoot }} instead of hardcoding http://git-wip-us.apache.org/repos/asf/calcite/blob/0c582435/site/_includes/docs_ul.html ---------------------------------------------------------------------- diff --git a/site/_includes/docs_ul.html b/site/_includes/docs_ul.html index 768259c..bf2fd71 100644 --- a/site/_includes/docs_ul.html +++ b/site/_includes/docs_ul.html @@ -4,6 +4,7 @@ {% for item in items %} {% comment %} Account for the baseurl to make sure we compare the full URI. {% endcomment %} {% capture item_url %}{{site.baseurl}}{{ item | prepend:"/docs/" | append:".html" }}{% endcapture %} + {% capture item_url2 %}{{site.baseurl}}{{ item | prepend:"/docs/" | append:"/" }}{% endcapture %} {% capture current_url %}{{ site.baseurl }}{{ page.url }}{% endcapture %} {% if item_url == current_url %} @@ -12,18 +13,22 @@ {% assign c = "" %} {% endif %} - {% for p in site.docs %} - {% capture p_url %}{{site.baseurl}}{{p.url}}{% endcapture %} - {% if p.sidebar_title != nil %} - {% assign anchor_text = p.sidebar_title %} - {% else %} - {% assign anchor_text = p.title %} - {% endif %} - {% if p_url == item_url %} - <li class="{{ c }}"><a href="{{ p_url }}">{{ anchor_text }}</a></li> - {% break %} - {% endif %} - {% endfor %} + {% for p in site.docs %}{% comment %} + {% endcomment %}{% capture p_url %}{{site.baseurl}}{{p.url}}{% endcapture %}{% comment %} + {% endcomment %}{% if p.sidebar_title != nil %}{% comment %} + {% endcomment %}{% assign anchor_text = p.sidebar_title %}{% comment %} + {% endcomment %}{% else %}{% comment %} + {% endcomment %}{% assign anchor_text = p.title %}{% comment %} + {% endcomment %}{% endif %}{% comment %} + {% endcomment %}{% if p_url == item_url %}{% comment %} + {% endcomment %}<li class="{{ c }}"><a href="{{ p_url }}">{{ anchor_text }}</a></li>{% comment %} + {% endcomment %}{% break %}{% comment %} + {% endcomment %}{% endif %}{% comment %} + {% endcomment %}{% if p_url == item_url2 %}{% comment %} + {% endcomment %}<li class="{{ c }}"><a href="{{ p.external_url }}">{{ anchor_text }}</a></li>{% comment %} + {% endcomment %}{% break %}{% comment %} + {% endcomment %}{% endif %}{% comment %} + {% endcomment %}{% endfor %} {% endfor %} </ul> http://git-wip-us.apache.org/repos/asf/calcite/blob/0c582435/site/_includes/news_contents.html ---------------------------------------------------------------------- diff --git a/site/_includes/news_contents.html b/site/_includes/news_contents.html index d1481e7..5cb8947 100644 --- a/site/_includes/news_contents.html +++ b/site/_includes/news_contents.html @@ -18,13 +18,13 @@ </ul> <h4>Other News</h4> <ul> - {% for post in site.posts %} - {% unless post.categories contains 'release' %} + {% for post in site.posts %}{% comment %} + {% endcomment %}{% unless post.categories contains 'release' %} <li class="{% if page.title == post.title %}current{% endif %}"> <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a> </li> - {% endunless %} - {% endfor %} + {% endunless %}{% comment %} + {% endcomment %}{% endfor %} </ul> </aside> </div>
