doc/documentation/content/en/books/fdp-primer/examples/chapter.adoc
Sergio Carlavilla Delgado 989d921f5d Migrate doc to Hugo/AsciiDoctor
I'm very pleased to announce the release of
our new website and documentation using
the new toolchain with Hugo and AsciiDoctor.

To get more information about the new toolchain
please read the FreeBSD Documentation Project Primer[1],
Hugo docs[2] and AsciiDoctor docs[3].

Acknowledgment:
Benedict Reuschling <bcr@>
Glen Barber <gjb@>
Hiroki Sato <hrs@>
Li-Wen Hsu <lwhsu@>
Sean Chittenden <seanc@>
The FreeBSD Foundation

[1] https://docs.FreeBSD.org/en/books/fdp-primer/
[2] https://gohugo.io/documentation/
[3] https://docs.asciidoctor.org/home/

Approved by:    doceng, core
2021-01-26 00:31:29 +01:00

137 lines
2.3 KiB
Text

---
title: Appendix A. Examples
prev: books/fdp-primer/see-also/
---
[appendix]
[[examples]]
= Examples
:doctype: book
:toc: macro
:toclevels: 1
:icons: font
:sectnums:
:sectnumlevels: 6
:source-highlighter: rouge
:experimental:
:skip-front-matter:
:xrefstyle: basic
:relfileprefix: ../
:outfilesuffix:
:sectnumoffset: A
toc::[]
These examples are not exhaustive-they do not contain all the elements that might be desirable to use, particularly in a document's front matter. For more examples of AsciiDoctor, examine the AsciiDoc source for this and other documents available in the Git `doc` repository, or available online starting at link:https://cgit.freebsd.org/doc/[https://cgit.freebsd.org/doc/].
[[examples-asciidoctor-book]]
== AsciiDoctor `book`
.AsciiDoctor `book`
[example]
====
[.programlisting]
....
---
title: An Example Book
authors:
- author: The FreeBSD Documentation Project
copyright: 1995-2021 The FreeBSD Documentation Project
releaseinfo: ""
trademarks: ["general"]
---
= An Example Book
:doctype: book
:toc: macro
:toclevels: 2
:icons: font
:xrefstyle: basic
:relfileprefix: ../
:outfilesuffix:
:sectnums:
:sectnumlevels: 6
:partnums:
:chapter-signifier: Chapter
:part-signifier: Part
:source-highlighter: rouge
:experimental:
:skip-front-matter:
:book: true
:pdf: false
ifeval::["{backend}" == "html5"]
:chapters-path: content/en/books/bookname/
endif::[]
ifeval::["{backend}" == "pdf"]
:chapters-path:
endif::[]
ifeval::["{backend}" == "epub3"]
:chapters-path:
endif::[]
[abstract]
Abstract
Abstract section
'''
toc::[]
:sectnums!:
\include::{chapters-path}preface/_index.adoc[leveloffset=+1]
:sectnums:
\include::{chapters-path}parti.adoc[lines=7..18]
\include::{chapters-path}chapter-name/_index.adoc[leveloffset=+1]
....
====
[[examples-asciidoctor-article]]
== AsciiDoctor `article`
.AsciiDoctor `article`
[example]
====
[.programlisting]
....
---
title: An Example Article
authors:
- author: Your name and surname
email: foo@example.com
trademarks: ["general"]
---
= An Example Article
:doctype: article
:toc: macro
:toclevels: 1
:icons: font
:sectnums:
:sectnumlevels: 6
:source-highlighter: rouge
:experimental:
'''
toc::[]
== My First Section
This is the first section in my article.
== My First Sub-Section
This is the first sub-section in my article.
....
====