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/11/22 21:15:22 UTC
[pdfbox-docs] branch master updated: PDFBOX-5024: document new
feature to place code snippets
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 59d8cb7 PDFBOX-5024: document new feature to place code snippets
59d8cb7 is described below
commit 59d8cb7ba20be80de0ca37cf69981bf6c3773b00
Author: Maruan Sahyoun <sa...@fileaffairs.de>
AuthorDate: Sun Nov 22 22:15:03 2020 +0100
PDFBOX-5024: document new feature to place code snippets
---
content/siteupdate.md | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/content/siteupdate.md b/content/siteupdate.md
index 1954421..2c47cd0 100644
--- a/content/siteupdate.md
+++ b/content/siteupdate.md
@@ -71,7 +71,28 @@ To validate the generated website document go to the project root directory and
$ npm run checks
~~~
-This will validate the generated HTML for conformance to the specification as well as run accessibility tests. Testing is done using [HTML-validate](https://html-validate.org/).
+### Reuse code from examples in the documentation
+
+In order to reuse code from the examples project in the documentation the shortcode `codesnippet` can be used.
+
+The shortcode expects two variables
+
+- the **relative** path to the examples code such as `interactive/form/CreateCheckBox.java`
+- the version to be used such as `trunk` or `2.0`
+
+In addition - in order to be able to only put parts of the code into
+the documentation the following comments can be added to the java code
+
+~~~
+//DOC-START
+...
+//DOC-END
+~~~
+
+The DOC-START/DOC-END pair can be placed multiple times into the Java
+code. Everything between these special comment lines will be added the
+other content will be omitted. This will allow to skip license
+header, import statements etc. to concentrate on the important bits.
### Publish the Website (For Comitters Only)