From 129bf71ac3021784d35a808d606b01cfffee12de Mon Sep 17 00:00:00 2001 From: John Dallaway Date: Thu, 11 Jul 2024 14:03:27 +0100 Subject: [PATCH] Add AsciiDoc build infrastructure --- .gitattributes | 1 + .../.asciidoctorconfig.adoc | 2 + doc/org.eclipse.cdt.doc.user/.gitignore | 1 + doc/org.eclipse.cdt.doc.user/build.properties | 5 +- doc/org.eclipse.cdt.doc.user/help.css | 22 +++++++ doc/org.eclipse.cdt.doc.user/pom.xml | 28 +++++++- .../src/asciidoc/example.adoc | 65 +++++++++++++++++++ 7 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 doc/org.eclipse.cdt.doc.user/.asciidoctorconfig.adoc create mode 100644 doc/org.eclipse.cdt.doc.user/src/asciidoc/example.adoc diff --git a/.gitattributes b/.gitattributes index b876713fea0..58d73653580 100644 --- a/.gitattributes +++ b/.gitattributes @@ -181,3 +181,4 @@ cdtOptions text *.py text *.xhtml text *.entitlements text +*.adoc text diff --git a/doc/org.eclipse.cdt.doc.user/.asciidoctorconfig.adoc b/doc/org.eclipse.cdt.doc.user/.asciidoctorconfig.adoc new file mode 100644 index 00000000000..d03e27937d2 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/.asciidoctorconfig.adoc @@ -0,0 +1,2 @@ +// support image rendering within the Asciidoctor Editor +:imagesdir: {asciidoctorconfigdir}/images diff --git a/doc/org.eclipse.cdt.doc.user/.gitignore b/doc/org.eclipse.cdt.doc.user/.gitignore index 9e440c00d03..7cb3f4e9213 100644 --- a/doc/org.eclipse.cdt.doc.user/.gitignore +++ b/doc/org.eclipse.cdt.doc.user/.gitignore @@ -1 +1,2 @@ +/html/ /workspace/ diff --git a/doc/org.eclipse.cdt.doc.user/build.properties b/doc/org.eclipse.cdt.doc.user/build.properties index 2e45cd9125c..3f0e0a171b4 100644 --- a/doc/org.eclipse.cdt.doc.user/build.properties +++ b/doc/org.eclipse.cdt.doc.user/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000, 2011 IBM Corporation and others. +# Copyright (c) 2000, 2024 IBM Corporation and others. # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -38,7 +38,8 @@ bin.includes = about.html,\ intro/,\ notices.html,\ book.css,\ - index*/ + index*/,\ + html/ bin.excludes = build.properties,\ customBuildCallbacks.xml diff --git a/doc/org.eclipse.cdt.doc.user/help.css b/doc/org.eclipse.cdt.doc.user/help.css index 338e3bd22de..f1a870cbb7f 100644 --- a/doc/org.eclipse.cdt.doc.user/help.css +++ b/doc/org.eclipse.cdt.doc.user/help.css @@ -60,3 +60,25 @@ div.linux {display:none;} .bold {font-weight:600;} .linethrough {text-decoration: line-through;} .underline {text-decoration: underline;} + +/* AsciiDoc support based on Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ +p.tableblock { margin: 0 } +table.tableblock tr th, table.tableblock tr td { padding: 0.3em } +table.tableblock, th.tableblock, td.tableblock { border: 0 solid #dedede } +table.grid-all>thead>tr>.tableblock, table.grid-all>tbody>tr>.tableblock { border-width: 0 1px 1px 0 } +table.grid-all>tfoot>tr>.tableblock { border-width: 1px 1px 0 0 } +table.grid-cols>*>tr>.tableblock { border-width: 0 1px 0 0 } +table.grid-rows>thead>tr>.tableblock, table.grid-rows>tbody>tr>.tableblock { border-width: 0 0 1px 0 } +table.grid-rows>tfoot>tr>.tableblock { border-width: 1px 0 0 0 } +table.grid-all>*>tr>.tableblock:last-child, table.grid-cols>*>tr>.tableblock:last-child { border-right-width: 0 } +table.grid-all>tbody>tr:last-child>.tableblock, table.grid-all>thead:last-child>tr>.tableblock, table.grid-rows>tbody>tr:last-child>.tableblock, table.grid-rows>thead:last-child>tr>.tableblock { border-bottom-width: 0 } +table.frame-all { border-width: 1px } +table.frame-sides { border-width: 0 1px } +table.frame-topbot { border-width: 1px 0 } +th.halign-left, td.halign-left { text-align: left } +th.halign-right, td.halign-right { text-align: right } +th.halign-center, td.halign-center { text-align: center } +th.valign-top, td.valign-top { vertical-align: top } +th.valign-bottom, td.valign-bottom { vertical-align: bottom } +th.valign-middle, td.valign-middle { vertical-align: middle } +div.listingblock pre { padding: 0.7em } diff --git a/doc/org.eclipse.cdt.doc.user/pom.xml b/doc/org.eclipse.cdt.doc.user/pom.xml index a9cc1cb8bbd..56b4c8f7288 100644 --- a/doc/org.eclipse.cdt.doc.user/pom.xml +++ b/doc/org.eclipse.cdt.doc.user/pom.xml @@ -1,6 +1,6 @@