Skip to content

Commit

Permalink
Example AsciiDoc content
Browse files Browse the repository at this point in the history
  • Loading branch information
jld01 committed Jul 12, 2024
1 parent abe036e commit 5794b7b
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/org.eclipse.cdt.doc.user/.asciidoctorconfig.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// support image rendering within the Asciidoctor Editor
:imagesdir: {asciidoctorconfigdir}/images
1 change: 1 addition & 0 deletions doc/org.eclipse.cdt.doc.user/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/html/
/workspace/
3 changes: 2 additions & 1 deletion doc/org.eclipse.cdt.doc.user/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ bin.includes = about.html,\
intro/,\
notices.html,\
book.css,\
index*/
index*/,\
html/

bin.excludes = build.properties,\
customBuildCallbacks.xml
Expand Down
26 changes: 26 additions & 0 deletions doc/org.eclipse.cdt.doc.user/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,32 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>adoc-to-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/html</outputDirectory>
<attributes>
<icons>font</icons>
<imagesdir>../images</imagesdir>
<linkcss />
<source-highlighter>coderay</source-highlighter>
<stylesdir>..</stylesdir>
<stylesheet>help.css</stylesheet>
<toc>macro</toc>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
41 changes: 41 additions & 0 deletions doc/org.eclipse.cdt.doc.user/src/asciidoc/example.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
////
Copyright (c) 2024 John Dallaway and others
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:
John Dallaway - initial content
////

// 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
:toc:
:toc-placement!:
endif::[]

= Example document

toc::[]

== Images

Example image:

image:search.png[Search dialog]

== Tables

Example table:

[options="header"]
|===
|Column A |Column B
|Cell 1A |Cell 1B
|Cell 2A |Cell 2B
|Cell 3A |Cell 3B
|===

0 comments on commit 5794b7b

Please sign in to comment.