You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ms...@apache.org on 2020/06/18 08:41:24 UTC
[pdfbox-docs] branch master updated: PDFBOX-4848: remove Liquid
code needed for Jekyll compatibility
This is an automated email from the ASF dual-hosted git repository.
msahyoun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pdfbox-docs.git
The following commit(s) were added to refs/heads/master by this push:
new 5fca1a2 PDFBOX-4848: remove Liquid code needed for Jekyll compatibility
5fca1a2 is described below
commit 5fca1a20907ab00649f2823fb3256fbc69b32e14
Author: Maruan Sahyoun <sa...@fileaffairs.de>
AuthorDate: Thu Jun 18 10:40:33 2020 +0200
PDFBOX-4848: remove Liquid code needed for Jekyll compatibility
---
content/_includes/footer.html | 2 +-
content/_includes/head.html | 2 +-
content/_includes/toc.html | 85 -------------------------------------
content/_layouts/documentation.html | 4 --
content/blog.md | 14 +-----
content/index.md | 25 +----------
6 files changed, 4 insertions(+), 128 deletions(-)
diff --git a/content/_includes/footer.html b/content/_includes/footer.html
index 93acda7..22f7ffa 100644
--- a/content/_includes/footer.html
+++ b/content/_includes/footer.html
@@ -5,7 +5,7 @@
<!-- nothing in here on purpose -->
</div>
<div class="span9">
- <p>Copyright © 2009–{{ site.time | date: '%Y' }} <a href="https://www.apache.org/">The Apache Software Foundation</a>. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+ <p>Copyright © 2009–{{ date | date: '%Y' }} <a href="https://www.apache.org/">The Apache Software Foundation</a>. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
<br>Apache PDFBox, PDFBox, Apache, the Apache feather logo and the Apache PDFBox project logos are trademarks of The Apache Software Foundation.</p>
</div>
</div>
diff --git a/content/_includes/head.html b/content/_includes/head.html
index 12a6d8a..06232db 100644
--- a/content/_includes/head.html
+++ b/content/_includes/head.html
@@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{site.description}}">
- <title>Apache PDFBox | {% if page.title %}{{ page.title }}{% else %}{{title}}{% endif %}</title>
+ <title>Apache PDFBox | {{title}}</title>
<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/pygments-github.css" rel="stylesheet">
diff --git a/content/_includes/toc.html b/content/_includes/toc.html
deleted file mode 100644
index b9316a0..0000000
--- a/content/_includes/toc.html
+++ /dev/null
@@ -1,85 +0,0 @@
-{% capture tocWorkspace %}
- {% comment %}
- Version 1.0.4
- https://github.com/allejo/jekyll-toc
-
- "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
-
- Usage:
- {% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
-
- Parameters:
- * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
-
- Optional Parameters:
- * sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
- * class (string) : '' - a CSS class assigned to the TOC
- * id (string) : '' - an ID to assigned to the TOC
- * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
- * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
- * ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
- * item_class (string) : '' - add custom class for each list item; has support for '%level%' placeholder, which is the current heading level
-
- Output:
- An ordered or unordered list representing the table of contents of a markdown block. This snippet will only generate the table of contents and will NOT output the markdown given to it
- {% endcomment %}
-
- {% capture my_toc %}{% endcapture %}
- {% assign orderedList = include.ordered | default: false %}
- {% assign minHeader = include.h_min | default: 1 %}
- {% assign maxHeader = include.h_max | default: 6 %}
- {% assign nodes = include.html | split: '<h' %}
- {% assign firstHeader = true %}
-
- {% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
-
- {% for node in nodes %}
- {% if node == "" %}
- {% continue %}
- {% endif %}
-
- {% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
-
- {% if headerLevel < minHeader or headerLevel > maxHeader %}
- {% continue %}
- {% endif %}
-
- {% if firstHeader %}
- {% assign firstHeader = false %}
- {% assign minHeader = headerLevel %}
- {% endif %}
-
- {% assign indentAmount = headerLevel | minus: minHeader | add: 1 %}
- {% assign _workspace = node | split: '</h' %}
-
- {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
- {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
- {% assign html_id = _idWorkspace[0] %}
-
- {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
- {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
-
- {% assign space = '' %}
- {% for i in (1..indentAmount) %}
- {% assign space = space | prepend: ' ' %}
- {% endfor %}
-
- {% unless include.item_class == blank %}
- {% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
- {% endunless %}
-
- {% capture my_toc %}{{ my_toc }}
-{{ space }}{{ listModifier }} {{ listItemClass }} [{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}](#{{ html_id }}){% endcapture %}
-
- {% endfor %}
-
- {% if include.class %}
- {% capture my_toc %}{:.{{ include.class }}}
-{{ my_toc | lstrip }}{% endcapture %}
- {% endif %}
-
- {% if include.id %}
- {% capture my_toc %}{: #{{ include.id }}}
-{{ my_toc | lstrip }}{% endcapture %}
- {% endif %}
-{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}
diff --git a/content/_layouts/documentation.html b/content/_layouts/documentation.html
index c9d0bc5..91c5b15 100644
--- a/content/_layouts/documentation.html
+++ b/content/_layouts/documentation.html
@@ -55,11 +55,7 @@
</section>
<aside>
<h1>Table of Contents</h1>
- {% if title.length > 0 %}
{{ content | toc | safe }}
- {% else %}
- {% include toc.html html=content h_min=2 h_max=3 %}
- {% endif %}
</aside>
</div>
diff --git a/content/blog.md b/content/blog.md
index 5acd82b..0827b1c 100644
--- a/content/blog.md
+++ b/content/blog.md
@@ -22,19 +22,7 @@ title: Blog
# Blog
-{% comment %}
-As we transition from Jekyll to Eleventy because of the new maven/node.js based build
-there are two loops with different collection objects to be able to render with Jekyll
-as well as with Eleventy. will be cleaned up after the transisiton has been completed.
-{% endcomment %}
-{% comment %}this block will be handled by Eleventy{% endcomment %}
{% for post in collections.posts reversed %}
<h2>{{ post.data.title }}<br><small>{{ post.data.page.date | date: "%Y-%m-%d"}}</small></h2>
{{ post.templateContent }}
-{% endfor %}
-
-{% comment %}this block will be handled by Jekyll{% endcomment %}
-{% for post in site.posts %}
-<h2>{{ post.title }}<br><small>{{ post.date | date: "%Y-%m-%d"}}</small></h2>
-{{ post.content }}
-{% endfor %}
+{% endfor %}
\ No newline at end of file
diff --git a/content/index.md b/content/index.md
index 6cba4cb..f0121ec 100644
--- a/content/index.md
+++ b/content/index.md
@@ -26,12 +26,6 @@ title: A Java PDF Library
documents and the ability to extract content from documents. Apache PDFBox also includes several
command-line utilities. Apache PDFBox is published under the Apache License v2.0.</p>
- {% comment %}
-As we transition from Jekyll to Eleventy because of the new maven/node.js based build
-there are two loops with different collection objects to be able to render with Jekyll
-as well as with Eleventy. will be cleaned up after the transisiton has been completed.
-{% endcomment %}
-{% comment %}this block will be handled by Eleventy{% endcomment %}
{% if collections.posts.length > 0 %}
{% assign items = collections.posts | reverse %}
{% for post in items limit:1%}
@@ -40,12 +34,6 @@ as well as with Eleventy. will be cleaned up after the transisiton has been comp
{% endfor %}
{% endif %}
-{% comment %}this block will be handled by Jekyll{% endcomment %}
-{% for post in site.categories.news limit:1 %}
-<h2>{{ post.title }}<br><small>{{ post.date | date: "%Y-%m-%d"}}</small></h2>
-{{ post.content }}
-{% endfor %}
-
## Getting Help ##
To get help on using PDFBox, please [Subscribe to the Users Mailing List](mailto:users-subscribe@pdfbox.apache.org) and post your
@@ -97,21 +85,10 @@ skills. Subscribe to the [Mailing Lists](/mailinglists.html) and find out how yo
## News
-{% comment %}
-As we transition from Jekyll to Eleventy because of the new maven/node.js based build
-there are two loops with different collection objects to be able to render with Jekyll
-as well as with Eleventy. will be cleaned up after the transisiton has been completed.
-{% endcomment %}
-{% comment %}this block will be handled by Eleventy{% endcomment %}
{% if collections.posts.length > 0 %}
{% assign items = collections.posts %}
{% for post in items offset:1 limit:5 %}
<h2>{{ post.data.title }}<br><small>{{ post.data.page.date | date: "%Y-%m-%d"}}</small></h2>
{{ post.templateContent }}
{% endfor %}
-{% endif %}
-
-{% for post in site.categories.news offset:1 limit:5 %}
-<h3>{{ post.title }}<br><small>{{ post.date | date: "%Y-%m-%d"}}</small></h3>
-{{ post.content }}
-{% endfor %}
+{% endif %}
\ No newline at end of file