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 50b5fb7 PDFBOX-3330: add edit link to documenation pages 50b5fb7 is described below commit 50b5fb72a1978d2876b3ac813bf72b66e17415f7 Author: Maruan Sahyoun <sahy...@fileaffairs.de> AuthorDate: Wed Jul 8 18:43:07 2020 +0200 PDFBOX-3330: add edit link to documenation pages --- content/_data/metadata.json | 3 ++- content/_layouts/documentation.html | 6 +++++- content/_sass/documentation.scss | 13 +++++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/content/_data/metadata.json b/content/_data/metadata.json index c537294..aadd262 100644 --- a/content/_data/metadata.json +++ b/content/_data/metadata.json @@ -1,5 +1,6 @@ { "title": "Apache PDFBox | A Java PDF Library", "url": "https://pdfbox.apache.org/", - "description": "The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing 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." + "description": "The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing 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.", + "githubEdit": "https://github.com/apache/pdfbox-docs/edit/master/" } \ No newline at end of file diff --git a/content/_layouts/documentation.html b/content/_layouts/documentation.html index 91c5b15..68c3192 100644 --- a/content/_layouts/documentation.html +++ b/content/_layouts/documentation.html @@ -54,7 +54,11 @@ {{ content }} </section> <aside> - <h1>Table of Contents</h1> + + <h1>Table of Contents<a class="edit-link" href="{{ metadata.githubEdit }}{{ page.inputPath }}" title="Edit this page"> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00 [...] + </a></h1> + {{ content | toc | safe }} </aside> </div> diff --git a/content/_sass/documentation.scss b/content/_sass/documentation.scss index 9941251..8fda371 100644 --- a/content/_sass/documentation.scss +++ b/content/_sass/documentation.scss @@ -49,8 +49,8 @@ } aside { - min-width: 22rem; - max-width: 22rem; + min-width: 25rem; + max-width: 25rem; padding-left: 2rem; h1 { @@ -85,6 +85,15 @@ padding: 4px 5px 4px 23px; display: block; } + + & .edit-link { + float: right; + padding: 0; + } + + & h1 svg { + fill: #337ab7; + } } div.highlight {