Skip to content

Latest commit

 

History

History
72 lines (72 loc) · 3.98 KB

style-guide.adoc

File metadata and controls

72 lines (72 loc) · 3.98 KB
  • pay attention to and follow the existing style

    • standardize whenever possible and formalize conventions here

  • images

    • center most and constrain to 80% wide

  • exclude optional slashes at ends of hyperlinks

  • capitalize product/project names in prose as they appear in upstream’s branding/docs

  • capitalize only the first letter of the first word of sections/headers

    • except: follow styling of proper nouns, acronyms, etc.

  • lists

    • ordered lists

      • use captals and periods, even if using incomplete sentences

  • define jargon and acronym twice:

    • at first appearance, immediately following the term, in parentheses or locale-appropriate delimiters

    • in the glossary

  • footnotes

    • don’t use footnotes

  • links

    • include links next to or very near context, but try to avoid breaking the flow of text

    • always include typed-out URL, never link text directly

      • this is to ensure consistent appearance across print and electronic versions

    • exclude URL scheme from http(s) links

      • this is handled automatically by asciidoc option hide-uri-scheme

      • https is a safe guess/default (and hopefully people insist on https client-side!)

    • if a link works without www. at the beginning of the domain name, omit it

      • this is bit of a risk: we’re prioritizing shorter links in favor of more reliable links (some websites redirect, adding back www.)

    • if a link works without a SEO slug, omit it

      • example w/slug: https://reddit.com/r/BorgBackup/comments/v3bwfg/why_should_i_switch_from_restic_to_borg/

      • example w/o slug: https://reddit.com/r/BorgBackup/comments/v3bwfg/

      • shorter is better, canonical/permalink is best (if you are forced to choose)

    • use more readable version for cross references whenever possible

      • no: <<_more_about_foss>>

      • yes: <<More about FOSS>>

  • use “command line” to refer to a Linux text-based interactive user interface

  • use Oxford commas

  • use one sentence per line

  • shell scripts

    • prefer long form for command line flags, e.g. --attribute instead of -a

    • prioritize portability and maintainability

  • release versioning

    • use semver-like major, minor, patch version numbers

  • source control

  • use shb namespace for document attributes

    • short for “self-hosting book”

    • example: shb-printPDF, used when generating a PDF for printing

  • include a trailing slash when referencing folders, e.g. ansible/

  • indexing

    • prefer flow index terms over concealed index terms

    • use your gut: index a term when it feels helpful to draw the reader’s attention somewhere to read more about the term

    • don’t worry about indexing every occurence of a particular term — focus on where it is specifically discussed/defined, rather than just used

    • note: indexes are only generated for PDF outputs

  • data is plural, use context for singular (e.g. “piece of data”)

  • colons: captalize word after? sometimes? TBD

  • em dash: omit space before and after