From 1a34cd1cb619f775db31667321eb4d1cf1d21a54 Mon Sep 17 00:00:00 2001 From: John Dallaway Date: Thu, 7 Nov 2024 12:20:08 +0000 Subject: [PATCH] Use relative path to documentation images folder for GitHub --- doc/org.eclipse.cdt.doc.user/README.md | 13 +++++++++++++ .../src/asciidoc/example.adoc | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 doc/org.eclipse.cdt.doc.user/README.md diff --git a/doc/org.eclipse.cdt.doc.user/README.md b/doc/org.eclipse.cdt.doc.user/README.md new file mode 100644 index 00000000000..93e425d0d3e --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/README.md @@ -0,0 +1,13 @@ +# C/C++ Development User Guide + +## AsciiDoc content + +The Asciidoctor Maven Plugin is configured to generate an HTML file in the `html/` folder for each AsciiDoc source file (`*.adoc`) placed in the `src/asciidoc/` folder. + +All AsciiDoc source files should include GitHub rendering support, as illustrated in the [example document](src/asciidoc/example.adoc). + +During content development, HTML files may be generated by invoking Maven locally: + +``` +mvn --define jgit.dirtyWorkingTree=ignore --projects org.eclipse.cdt:org.eclipse.cdt.doc.user generate-resources +``` diff --git a/doc/org.eclipse.cdt.doc.user/src/asciidoc/example.adoc b/doc/org.eclipse.cdt.doc.user/src/asciidoc/example.adoc index 7111033360c..3613c42051d 100644 --- a/doc/org.eclipse.cdt.doc.user/src/asciidoc/example.adoc +++ b/doc/org.eclipse.cdt.doc.user/src/asciidoc/example.adoc @@ -13,7 +13,7 @@ Contributors: // support image rendering and table of contents within GitHub ifdef::env-github[] -:imagesdir: https://raw.githubusercontent.com/eclipse-cdt/cdt/main/doc/org.eclipse.cdt.doc.user/images +:imagesdir: ../../images :toc: :toc-placement!: endif::[]