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/09 14:40:21 UTC
[pdfbox-docs] branch master updated: PDFBOX-4848: initial support
to generate site via maven and node.js
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 f409a70 PDFBOX-4848: initial support to generate site via maven and node.js
f409a70 is described below
commit f409a708090b9b3b32ee6edbf0486e711a6c73db
Author: Maruan Sahyoun <sa...@fileaffairs.de>
AuthorDate: Tue Jun 9 16:40:00 2020 +0200
PDFBOX-4848: initial support to generate site via maven and node.js
---
.eleventy.js | 7 +++++++
content/_data/eleventyComputed.js | 12 ++++++++++++
package.json | 5 ++++-
3 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/.eleventy.js b/.eleventy.js
new file mode 100644
index 0000000..1f6459b
--- /dev/null
+++ b/.eleventy.js
@@ -0,0 +1,7 @@
+module.exports = {
+ dir: {
+ input: "content",
+ layouts: "_layouts",
+ output: "staging/content"
+ }
+};
diff --git a/content/_data/eleventyComputed.js b/content/_data/eleventyComputed.js
new file mode 100644
index 0000000..044a583
--- /dev/null
+++ b/content/_data/eleventyComputed.js
@@ -0,0 +1,12 @@
+module.exports = {
+ date: function(inputPath) {
+ return new Date();
+ },
+ permalink: (data) => {
+ // ignore templates in _posts
+ if (data.page.inputPath.indexOf('_posts') != -1) {
+ return false;
+ }
+ return data.page.filePathStem + '.html';
+ }
+ };
\ No newline at end of file
diff --git a/package.json b/package.json
index a3fb94c..3ab48fc 100644
--- a/package.json
+++ b/package.json
@@ -7,12 +7,15 @@
"url": "https://gitbox.apache.org/repos/asf/pdfbox-docs.git"
},
"scripts": {
- "build:noop": "echo \"Error: no test specified\" && exit 1",
+ "build:eleventy": "eleventy",
"build": "run-s build:*",
+ "preview": "run-s preview:*",
+ "preview:eleventy": "eleventy --serve",
"check:html": "html-validate 'staging/content/*/**/*.html'",
"checks": "run-s check:*"
},
"devDependencies": {
+ "@11ty/eleventy": "^0.11.0",
"html-validate": "^2.23.0",
"npm-run-all": "^4.1.5"
}