diff --git a/documentation/content/en/books/fdp-primer/structure/_index.adoc b/documentation/content/en/books/fdp-primer/structure/_index.adoc index d92af964e1..b35fb23373 100644 --- a/documentation/content/en/books/fdp-primer/structure/_index.adoc +++ b/documentation/content/en/books/fdp-primer/structure/_index.adoc @@ -1,252 +1,259 @@ --- title: Chapter 4. Documentation Directory Structure prev: books/fdp-primer/working-copy next: books/fdp-primer/doc-build description: Documentation Directory Structure explanation used in the FreeBSD Documentation Project tags: ["directory structure", "organization"] showBookMenu: true weight: 5 path: "/books/fdp-primer/" --- [[structure]] = Documentation Directory Structure :doctype: book :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :sectnumoffset: 4 :partnums: :source-highlighter: rouge :experimental: :images-path: books/fdp-primer/ ifdef::env-beastie[] ifdef::backend-html5[] :imagesdir: ../../../../images/{images-path} endif::[] ifndef::book[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] toc::[] endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] toc::[] include::../../../../../shared/asciidoctor.adoc[] endif::[] Files and directories in the *doc/* tree follow a structure meant to: . Make it easy to automate converting the document to other formats. . Promote consistency between the different documentation organizations, to make it easier to switch between working on different documents. . Make it easy to decide where in the tree new documentation should be placed. In addition, the documentation tree must accommodate documents in many different languages. It is important that the documentation tree structure does not enforce any particular defaults or cultural preferences. [[structure-top]] == The Top Level, doc/ There are three sections under *doc/*, documentation and website share the same structure. [cols="20%,80%", frame="none", options="header"] |=== | Directory | Usage | *documentation* | Contains all the articles and books in AsciiDoc format. Contains subdirectories to further categorize the information by languages. | *tools* | Contains a set of tools used to translate the documentation and the website using link:https://weblate.org/en/[Weblate]. The Weblate instance can be found link:https://translate-dev.freebsd.org[here]. | *shared* | Contains files that are not specific to the various translations of the documentation. Contains subdirectories to further categorize the information by languages and three files to store the authors, releases and mirrors information. This directory is shared between `documentation` and the `website`. | *website* | Contains the link:https://www.FreeBSD.org[FreeBSD website] in AsciiDoc format. Contains subdirectories to further categorize the information by languages. |=== [[structure-locale]] == The Directories These directories contain the documentation and the website. The documentation is organized into subdirectories below this level, following the link:https://gohugo.io/getting-started/directory-structure/[Hugo directory structure]. [cols="20%,80%", frame="none", options="header"] |=== | Directory | Usage | *archetypes* | Contain templates to create new articles, books and webpages. For more information take a look link:https://gohugo.io/content-management/archetypes/[here]. | *config* | Contain the Hugo configuration files. One main file and one file per language. For more information take a look link:https://gohugo.io/getting-started/configuration/[here]. | *content* | Contain the books, articles and webpages. One directory exists for each available translation of the documentation, for example `en` and `zh-tw`. | *data* | Contain custom data for build the website in link:https://en.wikipedia.org/wiki/TOML[TOML] format. This directory is used to store the events, news, press, etc. For more information take a look link:https://gohugo.io/templates/data-templates/[here]. | *static* | Contain static assets. Images, security advisories, the pgpkeys, etc. For more information take a look link:https://gohugo.io/content-management/static-files/[here]. | *themes* | Contain the templates in the form of `.html` files that specify how the website looks. For more information take a look link:https://gohugo.io/templates/[here]. | *tools* | Contain tools used to enhance the documentation build. For example to generate the Table of Contents of the books, etc. | *beastie.png* | This image doesn't need an introduction ;) | *LICENSE* | License of the documentation, shared and website. BSD 2-Clause License. | *Makefile* | The *Makefile* defines the build process of the documentation and the website. |=== [[structure-document]] == Document-Specific Information This section contains specific notes about particular documents managed by the FDP. [[structure-document-books]] == The Books: books/ The books are written in AsciiDoc. -The books are organized as an AsciiDoc `book`. -The books are divided into ``part``s, each of which contains several ``chapter``s. -``chapter``s are further subdivided into sections (`=`) and subsections (`==`, `===`) and so on. +For each FreeBSD book, the AsciiDoc document type (aka doctype) is `book`. +Books have ``part``s, each of which contains several ``chapter``s. + +When the document is converted to HTML 5 (using the built-in `html5` backend): + +* AsciiDoc section level 0 (`=`) at the beginning of a ``chapter`` of a `book` will be `