diff --git a/documentation/content/en/books/fdp-primer/book.adoc b/documentation/content/en/books/fdp-primer/book.adoc index 248a2ee0ee..0a0e43a665 100644 --- a/documentation/content/en/books/fdp-primer/book.adoc +++ b/documentation/content/en/books/fdp-primer/book.adoc @@ -1,97 +1,99 @@ --- title: FreeBSD Documentation Project Primer for New Contributors authors: - author: The FreeBSD Documentation Project copyright: 1998-2021 DocEng description: Everything you need to know in order to start contributing to the FreeBSD Documentation Project trademarks: ["general"] tags: ["FDP", "documentation", "FreeBSD", "Index"] add_split_page_link: true --- = FreeBSD Documentation Project Primer for New Contributors :doctype: book :toc: macro :toclevels: 2 :icons: font :sectnums: :sectnumlevels: 6 :partnums: :source-highlighter: rouge :experimental: :book: true :pdf: false :images-path: books/fdp-primer/ ifdef::env-beastie[] ifdef::backend-html5[] 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[] :chapters-path: content/{{% lang %}}/books/fdp-primer/ endif::[] ifdef::backend-pdf,backend-epub3[] :chapters-path: include::../../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] :chapters-path: include::../../../../../shared/asciidoctor.adoc[] endif::[] [.abstract-title] Abstract Thank you for becoming a part of the FreeBSD Documentation Project. Your contribution is extremely valuable, and we appreciate it. This primer covers details needed to start contributing to the FreeBSD Documentation Project, or FDP, including tools, software, and the philosophy behind the Documentation Project. This is a work in progress. Corrections and additions are always welcome. ''' toc::[] :sectnums!: include::{chapters-path}preface/_index.adoc[leveloffset=+1] :sectnums: include::{chapters-path}overview/_index.adoc[leveloffset=+1] include::{chapters-path}tools/_index.adoc[leveloffset=+1] include::{chapters-path}working-copy/_index.adoc[leveloffset=+1] include::{chapters-path}structure/_index.adoc[leveloffset=+1] include::{chapters-path}doc-build/_index.adoc[leveloffset=+1] include::{chapters-path}asciidoctor-primer/_index.adoc[leveloffset=+1] include::{chapters-path}rosetta/_index.adoc[leveloffset=+1] include::{chapters-path}translations/_index.adoc[leveloffset=+1] include::{chapters-path}po-translations/_index.adoc[leveloffset=+1] include::{chapters-path}manual-pages/_index.adoc[leveloffset=+1] include::{chapters-path}writing-style/_index.adoc[leveloffset=+1] include::{chapters-path}editor-config/_index.adoc[leveloffset=+1] +include::{chapters-path}trademarks/_index.adoc[leveloffset=+1] + include::{chapters-path}see-also/_index.adoc[leveloffset=+1] :sectnums!: include::{chapters-path}examples/_index.adoc[leveloffset=+1] :sectnums: diff --git a/documentation/content/en/books/fdp-primer/editor-config/_index.adoc b/documentation/content/en/books/fdp-primer/editor-config/_index.adoc index bb3314bee6..e6218dfb88 100644 --- a/documentation/content/en/books/fdp-primer/editor-config/_index.adoc +++ b/documentation/content/en/books/fdp-primer/editor-config/_index.adoc @@ -1,293 +1,293 @@ --- title: Chapter 12. Editor Configuration prev: books/fdp-primer/writing-style -next: books/fdp-primer/see-also +next: books/fdp-primer/trademarks description: Configuration used in the texts editors in the FreeBSD Documentation Project tags: ["editor", "configuration", "vim", "emacs", "FreeBSD"] showBookMenu: true weight: 13 path: "/books/fdp-primer/" --- [[editor-config]] = Editor Configuration :doctype: book :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :sectnumoffset: 12 :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::[] Adjusting your text editor configuration can make working on document files quicker and easier, and help documents conform to FDP guidelines. [[editor-config-vim]] == Vim Install from package:editors/vim[], or package:editors/vim-console[], then follow the configuration instructions in <>. More advanced users can use a proper linter like link:https://github.com/dense-analysis/ale[Ale] which can also act as a Vim link:https://langserver.org/[Language Server Protocol] client. [[editor-config-vim-use]] === Use Manual page writers can use the following keyboard shortcuts to reformat: * Press kbd:[P] to reformat paragraphs or text that has been selected in Visual mode. * Press kbd:[T] to replace groups of eight spaces with a tab. [[editor-config-vim-config]] === Configuration Edit [.filename]#~/.vimrc#, adding these lines to the end of the file: [.programlisting] .... if has("autocmd") au BufNewFile,BufRead *.adoc call Set_ADOC() au BufNewFile,BufRead *.[1-9] call Set_MAN() endif " has(autocmd) function Set_Highlights() "match ExtraWhitespace /^\s* \s*\|\s\+$/ return 0 endfunction " Set_Highlights_Adoc() function Set_Highlights_MAN() highlight default link OverLength ErrorMsg match OverLength /\%71v.\+/ return 0 endfunction " Set_Highlights_MAN() function ShowSpecial() setlocal list listchars=tab:>>,trail:*,eol:$ hi def link nontext ErrorMsg return 0 endfunction " ShowSpecial() function Set_COMMON() setlocal number setlocal shiftwidth=2 setlocal tabstop=8 setlocal softtabstop=2 setlocal formatprg="fmt -p" setlocal autoindent setlocal smartindent call ShowSpecial() call Set_Highlights() return 0 endfunction " Set_COMMON() function Set_ADOC() setlocal syntax=asciidoc setlocal filetype=asciidoc call Set_COMMON() return 0 endfunction " Set_ADOC() function Set_MAN() setlocal syntax=man setlocal filetype=man setlocal textwidth=70 " Rewrap paragraphs noremap P gqj " Replace spaces with tabs noremap T :s/ /\t/ call Set_COMMON() call Set_Highlights_MAN() return 0 endfunction " Set_Man() .... [[editor-config-emacs]] == Emacs Install from package:editors/emacs[] or package:editors/emacs-devel[]. [[editor-config-emacs-validation]] === Validation Emacs's nxml-mode uses compact relax NG schemas for validating XML. A compact relax NG schema for FreeBSD's extension to DocBook 5.0 is included in the documentation repository. To configure nxml-mode to validate using this schema, create [.filename]#~/.emacs.d/schema/schemas.xml# and add these lines to the file: .... locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0" documentElement localName="section" typeId="DocBook" documentElement localName="chapter" typeId="DocBook" documentElement localName="article" typeId="DocBook" documentElement localName="book" typeId="DocBook" typeId id="DocBook" uri="/usr/local/share/xml/docbook/5.0/rng/docbook.rnc" locatingRules .... [[editor-config-emacs-igor]] === Automated Proofreading with Flycheck and Igor The Flycheck package is available from Milkypostman's Emacs Lisp Package Archive (MELPA). If MELPA is not already in Emacs's packages-archives, it can be added by evaluating .... (add-to-list 'package-archives '("melpa" . "http://stable.melpa.org/packages/") t) .... Add the line to Emacs's initialization file (one of [.filename]#~/.emacs#, [.filename]#~/.emacs.el#, or [.filename]#~.emacs.d/init.el#) to make this change permanent. To install Flycheck, evaluate .... (package-install 'flycheck) .... Create a Flycheck checker for package:textproc/igor[] by evaluating .... (flycheck-define-checker igor "FreeBSD Documentation Project sanity checker. See URLs https://www.freebsd.org/docproj/ and http://www.freshports.org/textproc/igor/." :command ("igor" "-X" source-inplace) :error-parser flycheck-parse-checkstyle :modes (nxml-mode) :standard-input t) (add-to-list 'flycheck-checkers 'igor 'append) .... Again, add these lines to Emacs's initialization file to make the changes permanent. [[editor-config-emacs-specifc]] === FreeBSD Documentation Specific Settings To apply settings specific to the FreeBSD documentation project, create [.filename]#.dir-locals.el# in the root directory of the documentation repository and add these lines to the file: .... ;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ((nxml-mode (eval . (turn-on-auto-fill)) (fill-column . 70) (eval . (require 'flycheck)) (eval . (flycheck-mode 1)) (flycheck-checker . igor) (eval . (add-to-list 'rng-schema-locating-files "~/.emacs.d/schema/schemas.xml")))) .... [[editor-config-nano]] == nano Install from package:editors/nano[] or package:editors/nano-devel[]. [[editor-config-nano-config]] === Configuration Currently there is no adoc/asciidoc syntax highlight file with nano distribution. So let's create one from scratch and use an editor to create new file or add lines in the [.filename]#~/.nanorc# with these contents: .... syntax "asciidoc" "\.(adoc|asc|asciidoc)$" # main header color red "^====+$" # h1 color red "^==[[:space:]].*$" color red "^----+$" # h2 color magenta "^===[[:space:]].*$" color magenta "^~~~~+$" # h4 color green "^====[[:space:]].*$" color green "^\^\^\^\^+$" # h5 color brightblue "^=====[[:space:]].*$" color brightblue "^\+\+\+\++$" # attributes color brightgreen ":.*:" color brightred "\{[a-z0-9]*\}" color red "\\\{[a-z0-9]*\}" color red "\+\+\+\{[a-z0-9]*\}\+\+\+" # Paragraph Title color yellow "^\..*$" # source color magenta "^\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]" # Other markup color yellow ".*[[:space:]]\+$" color yellow "_[^_]+_" color yellow "\*[^\*]+\*" color yellow "\+[^\+]+\+" color yellow "`[^`]+`" color yellow "\^[^\^]+\^" color yellow "~[^~]+~" color yellow "'[^']+'" color cyan "`{1,2}[^']+'{1,2}" # bullets color brightmagenta "^[[:space:]]*[\*\.-]{1,5}[[:space:]]" # anchors color brightwhite "\[\[.*\]\]" color brightwhite "<<.*>>" # trailing whitespace color ,blue "[[:space:]]+$" # multiples of eight spaces at the start a line # (after zero or more tabs) should be a tab color ,blue "^([TAB]*[ ]{8})+" # tabs after spaces color ,yellow "( )+TAB" # highlight indents that have an odd number of spaces color ,red "^(([ ]{2})+|(TAB+))*[ ]{1}[^ ]{1}" .... Process the file to create embedded tabs: [source,shell] .... % perl -i'' -pe 's/TAB/\t/g' ~/.nanorc .... [[editor-config-nano-use]] === Use Specify additional helpful options when running the editor: [source,shell] .... % nano -AKipwz -T8 _index.adoc .... Users of man:csh[1] can define an alias in [.filename]#~/.cshrc# to automate these options: .... alias nano "nano -AKipwz -r 70 -T8" .... After the alias is defined, the options will be added automatically: [source,shell] .... % nano _index.adoc .... diff --git a/documentation/content/en/books/fdp-primer/examples/_index.adoc b/documentation/content/en/books/fdp-primer/examples/_index.adoc index 55322389cf..370bda43b2 100644 --- a/documentation/content/en/books/fdp-primer/examples/_index.adoc +++ b/documentation/content/en/books/fdp-primer/examples/_index.adoc @@ -1,163 +1,163 @@ --- title: Appendix A. Examples prev: books/fdp-primer/see-also/ description: Example of an article and a book used in the FreeBSD Documentation Project tags: ["examples", "tutorial", "AsciiDoctor", "Book", "Article"] showBookMenu: true -weight: 15 +weight: 16 path: "/books/fdp-primer/" --- [appendix] [[examples]] = Examples :doctype: book :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :sectnumoffset: A :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::[] 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. .... ==== diff --git a/documentation/content/en/books/fdp-primer/see-also/_index.adoc b/documentation/content/en/books/fdp-primer/see-also/_index.adoc index f41b9b6270..89905aa28d 100644 --- a/documentation/content/en/books/fdp-primer/see-also/_index.adoc +++ b/documentation/content/en/books/fdp-primer/see-also/_index.adoc @@ -1,77 +1,77 @@ --- -title: Chapter 13. See Also -prev: books/fdp-primer/editor-config/ +title: Chapter 14. See Also +prev: books/fdp-primer/trademarks/ next: books/fdp-primer/examples description: More information about the FreeBSD Documentation Project tags: ["additional information", "AsciiDoctor", "HTML"] showBookMenu: true -weight: 14 +weight: 15 path: "/books/fdp-primer/" --- [[see-also]] = See Also :doctype: book :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 -:sectnumoffset: 13 +:sectnumoffset: 14 :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::[] This document is deliberately not an exhaustive discussion of AsciiDoc and the FreeBSD Documentation Project. For more information about these, you are encouraged to see the following web sites. [[see-also-fdp]] == The FreeBSD Documentation Project * link:https://www.FreeBSD.org/docproj/[The FreeBSD Documentation Project web pages] * extref:{handbook}[The FreeBSD Handbook] [[see-also-hugo]] == Hugo * link:https://gohugo.io/[Hugo] * link:https://gohugo.io/documentation/[Hugo documentation] [[see-also-asciidoc]] == AsciiDoctor * link:https://asciidoctor.org/[AsciiDoctor] * link:https://docs.asciidoctor.org/[AsciiDoctor Documentation Portal] [[see-also-html]] == HTML * link:http://www.w3.org/[The World Wide Web Consortium] * link:https://dev.w3.org/html5/spec-LC/[The HTML 5 specification] * link:https://www.w3.org/Style/CSS/specs.en.html[CSS specification] * link:https://sass-lang.com/[Sass] diff --git a/documentation/content/en/books/fdp-primer/trademarks/_index.adoc b/documentation/content/en/books/fdp-primer/trademarks/_index.adoc new file mode 100644 index 0000000000..c0a457e114 --- /dev/null +++ b/documentation/content/en/books/fdp-primer/trademarks/_index.adoc @@ -0,0 +1,96 @@ +--- +title: Chapter 13. Trademarks +prev: books/fdp-primer/editor-config/ +next: books/fdp-primer/see-also +description: Guidelines for trademarks in the FreeBSD Documentation Project +tags: ["trademarks", "AsciiDoctor", "HTML"] +showBookMenu: true +weight: 14 +path: "/books/fdp-primer/" +--- + +[[trademarks]] += Trademarks +:doctype: book +:toc: macro +:toclevels: 1 +:icons: font +:sectnums: +:sectnumlevels: 6 +:sectnumoffset: 13 +: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::[] + +For all documents on the FreeBSD Documentation Project, it is necessary to cite registered trademarks, and that is a duty of every writer and contributor. + +[[trademark-symbols]] +== Trademark Symbols + +Add a registered trademark symbol (TM), (R), or other symbols in the first occurrence of the company or software name, and always when using logos. +Also, write the company or software name following its trademark guidelines. + +When in doubt, research the company on the Internet or the software's website in addition to the link:https://www.uspto.gov/trademarks[United States Patent and Trademark Office site]. + +[[trademark-citing]] +== Trademark Citing + +It is customary to cite trademarks in technical documentation, and the FreeBSD Documentation Project provides a template for it, which also avoids duplicating trademarks in the documents. + +First, check the project's link:https://cgit.freebsd.org/doc/tree/documentation/themes/beastie/i18n/en.toml#n197[template] for the trademark and then add it to the trademarks tag on the `Front Matter` section of the document, placed at the beginning of each document. + +The following is an example of the `Front Matter` of the extref:{contributing}[Contributing to FreeBSD] article: + +.... +--- +title: Contributing to FreeBSD +authors: + - author: Jordan Hubbard + - author: Sam Lawrance + - author: Mark Linimon +description: How to contribute to the FreeBSD Project +trademarks: ["freebsd", "ieee", "general"] +weight: 15 +tags: ["Contributing", "FreeBSD", "Non-Programmer Tasks", "Programmer Tasks"] +--- +.... + +The trademark tags `freebsd`, `ieee`, and `general` will be automatically rendered when building the document like this: + +.... +FreeBSD is a registered trademark of the FreeBSD Foundation. + +IEEE, POSIX, and 802 are registered trademarks of Institute of Electrical and Electronics Engineers, Inc. in the United States. + +Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this document, and the FreeBSD Project was aware of the trademark claim, the designations have been followed by the “™” or the “®” symbol. +.... + +If a trademark is not present in the project's template, it must be submitted. +Any developer or contributor can update the trademarks. + +The `freebsd` and `general` trademark tags are usually present in all documents.