git: 2cfe75b557 - main - FDP: Add subsection about images and icons

Sergio Carlavilla Delgado <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by carlavilla:

URL: https://cgit.FreeBSD.org/doc/commit/?id=2cfe75b557140446dfdfd081d87f9a4ac6f2880b

commit 2cfe75b557140446dfdfd081d87f9a4ac6f2880b
Author:     Sergio Carlavilla Delgado <[email protected]>
AuthorDate: 2023-09-20 07:38:41 +0000
Commit:     Sergio Carlavilla Delgado <[email protected]>
CommitDate: 2023-09-20 07:38:41 +0000

    FDP: Add subsection about images and icons
    
    PR:                     261847
    Reviewed by:            bcr@
    Differential Revision:  https://reviews.freebsd.org/D41775
---
 .../fdp-primer/asciidoctor-primer/_index.adoc      | 83 ++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc b/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc
index 9638651e68..67420c7746 100644
--- a/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc
+++ b/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc
@@ -240,6 +240,89 @@ And this would be rendered as.
 +
 extref:{ipsec-must}[IPSec-Must article]
 
+[[asciidoctor-images-icons]]
+== Images and Icons
+
+Images and icons play a crucial role in enhancing the overall user experience.
+These visual elements are strategically integrated to convey information, clarify concepts, and provide a visually engaging interface.
+
+[[asciidoctor-images]]
+=== Images
+
+Images help illustrate complex concepts, making them more accessible to users.
+
+The first step will be to add the image in the images directory in the path:
+
+* [.filename]#~/website/static/images/# for the website.
+* [.filename]#~/documentation/static/images/# for the documentation.
+
+For example, to add a new image to the FreeBSD installation process, the image will be saved to the path [.filename]#~/documentation/static/images/books/handbook/bsdinstall/new-image3.png#.
+
+The next step will be to configure the Asciidoctor attributes `images-path` and `imagesdir`.
+
+We are going to use as an example the header of the extref:{freebsd-releng}[FreeBSD Release Engineering] article.
+
+[source,asciidoc]
+....
+= FreeBSD Release Engineering
+:doctype: article
+
+[...]
+
+:images-path: articles/freebsd-releng/ <1>
+
+ifdef::env-beastie[]
+ifdef::backend-html5[]
+
+[...]
+
+:imagesdir: ../../../images/{images-path} <2>
+endif::[]
+
+[...]
+
+....
+
+<.> Makes reference to the path inside [.filename]#/static/images# folder.
+<.> Makes reference to the Asciidoctor attribute.
+
+Once the image is in the correct path and the Asciidoctor attributes have been configured in the document, the `image` macro can be used.
+
+This is an example:
+
+....
+image::new-image3.png[New step in the FreeBSD install process]
+....
+
+[TIP]
+====
+To improve accessibility, it is mandatory to add descriptive text to each image.
+====
+
+[[asciidoctor-icons]]
+=== Icons
+
+Icons serve as intuitive symbols for quick recognition and navigation.
+
+The first step to use icons is to add the `icons` property to the Asciidoctor properties section, at the top of each document.
+
+....
+:icons: font
+....
+
+Once the Asciidoctor icon property has been set an icon supported by link:https://fontawesome.com/v4/icons/[Font Awesome] can be added.
+
+This is an example about how to use the `envelope` icon:
+
+....
+icon:envelope[link=mailto:[email protected], title="contact"]
+....
+
+[TIP]
+====
+To improve the accessibility of the website, the `title` attribute is mandatory.
+====
+
 [[asciidoctor-conclusion]]
 == Conclusion
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.