Scrivere documentazione efficace per Discourse

:information_source: Discourse documentation is currently being reviewed and edited to align with this style guide. Not all documentation topics currently match up to this - we are working toward that as quickly as possible.

This is considered a living document that guides how Discourse documentation is written and formatted. This topic will be kept up to date as needed. If you are in doubt about any of the principles here, please post on the topic to discuss specifics.

The guiding principle behind this documentation style guide is to consider your readers and their needs when writing documentation - what do they want to accomplish? What is your goal for providing the content?

:eyes: Quick checklist when implementing the style guide:

  1. Meta block is present and correct
  2. Title is action-oriented
  3. All titles use sentence case
  4. Correct tags and categories are used
  5. Document is structured logically

When completing a document, review it to make sure all of those criteria are met.

Please take note of these text formatting guidelines:


Meta information

  • Document should belong to one and only one of the following categories:
    • Using Discourse
      • General user guides for non-administrative tasks
    • Site Management
      • Settings, plugins, content, and general site administration
    • Integrations
      • Guides for integrating other platforms with Discourse
    • Hosted Customers
      • Guides that are only relevant to hosted customers
    • Self-hosting
      • Guides that are only relevant to self-hosted sites
    • Developer Guides
      • Technical guides for developing on top of Discourse, including creating themes, theme components, and plugins
    • Contributing
      • Guides for contributing to the Discourse open-source project
  • Document should belong to one and only one of the following tags / document types:
    • #how-to
    • #explanation
    • #reference
    • #tutorial
  • Document may have any other applicable tags, with an absolute maximum of 5 tags on a single document

Meta block

All documents must have a block at the top that includes a short explanation of what the document is about as well as any additional relevant meta information, like what the user level requirements are, whether console access is required, or anything else. This will be formatted in a blockquote without a heading over it. Heres an example of what this must look like:

:bookmark: This is a guide for describing all available hidden site settings, how to enable them, and why you might want to adjust them.

:person_raising_hand: Required user level: Administrator

:computer: Console access required

Titles and headings

  • Make document titles action-oriented
    • Incorrect: “How to enable automatic titles for chat threads”
    • Correct: “Enabling automatic titles for chat threads”
  • Document titles should not be too long
  • For ‘how-to’ topics, make the title goal oriented
  • All titles must be specific and unique
  • Do not use punctuation or special characters in document titles, other than commas
  • Do not include emoji in document titles
  • Use sentence case for titles and headings - that means only the first word starts with a capital letter, along with proper nouns and any other words that would normally be capitalised
  • Do not use ampersands (&) in headings, rather use the full word (“and”)

General writing guidelines, tone, and grammar

  • Use second-person voice when referring to people reading the document - i.e. use “you”, not “we”
  • Use active voice as much as possible
    • Incorrect: “the button should be clicked”
    • Correct: “click the button”
  • Define acronyms and abbreviations when first used, if necessary provide an external link that provides more information
  • Use short sentences, and break up text using shorter paragraphs, headings, and lists
  • You can use **bold** and *italics* to emphasise key phrases or words, but don’t overuse them
  • Avoid using jargon or technical terms without explanations - if in doubt, err on the side of explaining
  • Use screenshots when describing a visual interface, such as a UI element
  • Don’t document or attempt to disclose future Discourse features, products, or services unless explicitly permitted
  • Use transition words such as therefore, although, and furthermore.
  • Use common contractions: it’s, you’ll, you’re, we’re, let’s
  • Infer timelessness in documentation - avoid words such as soon, new, now, latest, etc. that quickly become irrelevant
  • Don’t attribute human qualities to software or hardware
    • e.g. “If you pass an integer to this API, it will get angry and raise an error”
    • e.g. “Our friendly and ambitious AI bot will help solve all your problems”
  • When quoting text (including from the Discourse UI), use “quotation marks”
  • When quoting a URL, use backticks
  • When using an example domain use discourse.example.com
  • If it would be useful, you can use emojis at the start of a paragraph to highlight it. Do not use more than two or three of these in a single topic. Some example emojis you can use:
    • :information_source: - An informative note
    • :mega: - Announcement or notice
    • :warning: - A warning message
    • :exclamation: - Very important information
  • Avoid:
    • Unnecessary metaphors or humour
    • Cultural and regional references
    • Dictating or ordering procedures in a condescending tone - e.g. You must click Publish or You need to click Publish
    • Being overly polite. For example, Please click Publish
    • Using exclamation points unless absolutely needed
    • Capitalizing words where it is unnecessary
    • Excess use of the same phrases and pronouns

For end user documentation:
Maintain a friendly, informal tone, with a focus on being clear and concise in a knowledgeable manner. Get to the point promptly. Explain technical terms, but be careful not to be condescending. To ensure clarity, start by briefly specifying the context of the current topic.

For developer and technical documentation:
Maintain a direct and precise tone. Use the same tone you would for user documentation, but you can assume a higher level of technical knowledge in your readers.

Structure

  • Get to the point fast - lead with what’s most important
  • Include important keywords early in the document
  • Make reader choices and next steps obvious
  • Always use light markup to write documentation (This is already built into Discourse with Markdown-it).
  • Organize your documentation in a logical flow - start with an overview, followed by detailed sections, and a summary or conclusion if applicable
  • Use headings and subheadings to structure your content, making it easier for readers to scan and find specific information - use descending hierarchy in headings, starting with h2, and don’t skip levels
  • Provide links to related topics or sections within your documentation - this helps users find additional information without unnecessary searches

Links

  • Use meaningful text in links
    • Incorrect: “Click here to read the guide”
    • Correct: “Read the guide
  • Unless the format of the URL is important or instructive, don’t use a URL as link text - instead, use the page title or a description of the page
  • Link to external sites and sources instead of quoting or rewriting existing documentation
  • Ensure that the sites you link to are of high standard and quality
  • If the link downloads a file, explicitly mention it - also indicate the type of file being downloaded and a rough estimate of the file size

Code in documentation

  • Use block code with language-specific syntax highlighting when possible for large code examples
  • If it is not already self-explanatory, introduce a code example with an introductory sentence that initiates the example that follows - when in doubt, err on the side of explaining
  • Code examples should follow the best practices for writing code for the relevant coding language
  • Use inline code for expressing basic code attributes or when a full code block is not necessary, such as:
    • Attribute names and values
    • Class names
    • Command-line utility names
    • Data types
    • Environment variable names
    • Filenames, filename extensions, and paths
    • Folders and directories
    • HTTP verbs, status codes, and content-type values
    • Query parameter names and values
    • Text input
  • When you use a placeholder in code examples, commands, or other text, including an explanation for what the placeholder represents
    • Write an explanation for the first time you use the placeholder; if there are multiple placeholders or steps after the first use of that placeholder, you can explain the placeholder again
  • Provide an easy way for users or developers to copy and run code.
    • Show expected output, either in a separate section after the code example or by using code comments within the code example
  • Write secure code - never hard-code passwords, API Keys, or secure information in code

Procedures and step-by-step guides

  • Format procedures consistently, so readers can find them easily by scanning
  • Use a separate numbered entry for each step
  • Include actions that finalize a step, such as OK or Apply buttons
  • If the instruction appears in the same UI where the action occurs, it’s usually not necessary to provide location details
  • If you need to make sure the reader begins in the right place, provide a brief phrase at the beginning of the step

Accessibility and inclusivity

  • Use screenshots, diagrams, or videos where they add value, particularly for explaining complex steps or showing parts of an interface
  • Images should be used to back up text information, not replace it
  • Always use alt attributes for images
  • Always provide captions or transcripts for videos
  • Only use GIFs if you can fully explain the content in text
  • Choose simple images and crop extraneous detail
  • Use plain language and avoid figures of speech or idioms that might not be universally understood
  • Consider that your document will be used on a multitude of devices
  • Use gender-neutral language. Don’t use he, him, his, she, her, or hers while referencing people - to write around pronouns, you can:
    • Rewrite using the second person (you)
    • Rewrite the sentence to have a plural noun and pronoun
    • Use the words person or individual
    • Use articles the, an, or a instead of a pronoun
    • Use a plural pronoun such as they, their, or them, even if it references a single individual
  • When you’re writing about a real person, use the pronouns that person prefers
  • Be inclusive of gender identity, race, culture, religion, ability, age, sexual orientation, and socioeconomic class - include a wide variety of professions, cultures, educational settings, locales, and economic settings in examples
  • Avoid politicised content - in cases where political content needs to be included, remain neutral
  • Don’t make any generalisations about people, countries, and cultures, not even positive or neutral generalisations
  • Don’t write prejudiced and discriminatory content against any communities, especially minorities
  • Avoid qualitative terms related to historical events
  • Avoid using terms and metaphors associated with violence and military actions

Last edited by @hugh 2024-09-03T11:02:51Z

Last checked by @hugh 2025-03-10T03:50:30Z

Check documentPerform check on document:
8 Mi Piace

@hugh / @SaraDev
Vedo una certa incoerenza qui riguardo ai titoli.

Abbiamo questi esempi:

Ma poi diciamo questo:

Se inserisco l’esempio “corretto” nel convertitore, ottengo questo invece:

Enable Automatic Titles for Chat Threads

Dovremmo aggiornare il nostro esempio per corrispondere?

aside

Se dipendesse solo da me, avrei pensato che saremmo andati con la capitalizzazione delle frasi, e non sono sicuro del perché abbiamo “Chat Threads” in maiuscolo nel titolo dell’argomento corrente, quindi personalmente preferirei vedere questo:

Enable automatic titles for chat threads

Ma la coerenza è più importante alla fine e presumo che abbiate una buona ragione per aver scelto la raccomandazione attuale.

1 Mi Piace

Questa è un’ottima osservazione: non avevo fatto questo collegamento, ma è facile da aggiornare. Tuttavia:

La specifica della maiuscola iniziale per titolo era mia, perché la trovo generalmente più pulita e professionale. Penso che sia molto una mia opinione soggettiva, perché sia Google che Microsoft dicono di usare la maiuscola iniziale per frase nei titoli della documentazione. Anche altri siti che ho trovato dicono di usare la maiuscola iniziale per frase, quindi ripristinerò questo e aggiornerò il requisito di maiuscola lì.

3 Mi Piace

Noto anche che dicono di usare la sentence case per titoli e intestazioni. (Sono nello stesso team).

Sembra che attualmente non stiamo specificando la nostra preferenza per le intestazioni. Aggiungiamola anche mentre ci siamo.

1 Mi Piace

Concordo: lo aggiungerò qui per specificarlo esplicitamente.

1 Mi Piace

OK, visto che sono inarrestabile…

Mi piace che diciamo questo:

Ma nella guida, abbiamo questo esempio, attualmente:

La mia opinione è che sia inutile capitalizzare “Impostazioni Nascoste del Sito” qui. (appello all’autorità)

2 Mi Piace

Apprezzo l’appello :smile:

Sì, questo è un buon punto: quell’esempio è stato estratto da un documento reale in cui abbiamo utilizzato il titolo del documento esistente per descriverlo e, poiché quel documento utilizzava la maiuscola iniziale, anche il riferimento lo faceva. Con il passaggio dalla maiuscola iniziale alla maiuscola delle frasi, anche quel riferimento dovrebbe essere aggiornato.

1 Mi Piace

Ho apportato alcune modifiche a questa guida di stile ora basate sulla conversazione di cui sopra.

  • Titolo dell’argomento modificato in minuscolo iniziale
  • Titoli modificati in minuscolo iniziale
  • Rimossa una maiuscola non necessaria (Sintassi)
  • Sostituiti i segni di ampersand (&) nei titoli con “and”
  • Sostituiti gli slash (/) nei titoli con virgole o congiunzioni

Queste ultime due modifiche non sono state discusse: fatemi sapere se sembrano superflue o in contrasto con la guida (o, in alternativa, se dovremmo catturare tali linee guida nella guida).

2 Mi Piace

Mi piacciono gli ultimi due: sono decisamente in linea con lo spirito del resto della guida e vale la pena includerli nella guida stessa. Li aggiungerò ora.

1 Mi Piace

Presumo che le bandiere per etichettare documenti in altre lingue facciano eccezione.

1 Mi Piace

Oltre a evitare gli idiomi, ho sempre evitato di usare contrazioni nella documentazione. Pensavo che rendessero più difficile la comprensione per i lettori non anglofoni/non occidentali. L’inglese è una lingua strana.

Moreover?

A un certo punto, noi (forse io) abbiamo iniziato a usare il codice inline per fare riferimento alle impostazioni del sito. Ad esempio: “Abilita l’impostazione del sito discourse connect”. Questo potrebbe essere l’approccio giusto, ma sembra un po’ da sviluppatore.

Potrebbe valere la pena usare un nome segnaposto coerente per fare riferimento ai siti Discourse. Forse discourse.example.com? C’è della documentazione qui che si riferisce al sito Discourse come sitename.com. Mi ha davvero confuso.


Alcuni consigli generali di scrittura: leggi ciò che hai scritto come se fossi un membro del tuo (vedi quanto sono difficili le contrazioni?) pubblico di destinazione. Assicurati che le tue supposizioni sulla conoscenza pregressa del pubblico siano ragionevoli.

Per quanto apprezzi non avere più un sacco di argomenti di documentazione a me attribuiti, usare Discourse come autore di tutti gli argomenti di documentazione del team sembra un po’ freddo.

Ciò che ha reso di nuovo divertente scrivere per me è stato il consiglio di cercare modi per mettere un po’ di te stesso in ciò che scrivi. Potrebbe essere qualsiasi cosa, il tuo tono di voce, i tuoi hobby, qualsiasi cosa… Questo è in qualche modo l’opposto di ciò che viene raccomandato qui.

6 Mi Piace

Ciao Simon! :blob_wave:

Stavo per vedere come sarebbe andata, ma sì, sono lo stesso, cerco di evitare le contrazioni.

Hahah, sì… non userò nessuna di quelle parole nella documentazione, per non rivelare il mio :face_with_monocle:.

Certamente: Example Domains

Questo è il punto che sono venuto a discutere! :smiley:

Abbiamo avuto un sacco di avanti e indietro su questo, ed ero felice di vederlo incluso nella guida di stile per impostazione predefinita.

Ecco perché penso che sia importante: produrre documentazione deve essere accessibile al maggior numero possibile di membri della nostra community, inclusi (soprattutto?) i membri del nostro team Discourse.

Discourse è un software di discussione sociale. E una parte della documentazione è davvero una conversazione continua. Se sto condividendo una pratica su come inserisco i membri nella mia community, vorrei essere presentato come il “proprietario” di quell’argomento, in modo da poter rispondere alle domande ed espandere l’argomento.

D’altra parte, se un cliente chiede di una funzionalità che non abbiamo mai spiegato, vorrei poter utilizzare la guida di stile e produrre documentazione utile e generale, che ritengo essere il proprietario dell’argomento presenti più inerzia alla pubblicazione.

Inoltre, se produciamo documentazione al di fuori di Discourse (un’integrazione o la produzione da commenti di codice o altro), avere un “utente di documentazione” è probabilmente più facile come dettaglio di implementazione. :thinking:

Non penso che questa guida impedirà alle persone di infondere la loro voce e personalità, e di ospitare la discussione. Ma sarebbe fantastico se aiutasse più persone a entrare nella pratica della documentazione, che altrimenti non lo farebbero (e poi potremo spingerle a essere più personali!) :smiley:

3 Mi Piace

Fino a quando non avremo un modo nativo per gestire documenti localizzati, penso che anteporre le bandiere al titolo sia il modo più pratico per farlo, e una ragionevole eccezione a questa linea guida.

Penso che questo tipo di cose abbia opinioni e preferenze diverse in entrambi i casi, ma per questa guida di stile ci atteniamo alle norme industriali accettate. Ancora una volta, le linee guida di Google e Microsoft concordano entrambe sul fatto che sia meglio usare le contrazioni comuni.

Detto questo, ho letto alcuni post che suggeriscono che l’uso di contrazioni negative (come “can’t”) potrebbe rendere la comprensione più difficile per i non anglofoni. Approfondiremo ulteriormente questo aspetto e, se necessario, aggiorneremo la guida di stile di conseguenza.

Ho rimosso quell’esempio! :smile:

Sì, è molto comune (non solo su Discourse), ma sono d’accordo che non sia del tutto corretto. Sarebbe meglio usare le virgolette, quindi penso che lo renderò esplicito nella guida di stile.

Questo è un ottimo punto, lo aggiungerò alla guida di stile!

Grazie per questo feedback! @maiki ha fatto alcuni buoni punti sopra, e sono d’accordo con quello che dice lì. Per aggiungere a ciò, dirò che uno dei motivi per cui abbiamo spostato la documentazione ufficiale per avere @Discourse come autore è per dare loro un maggiore senso di autorità per i lettori, specialmente per le persone che si avvicinano alla documentazione per la prima volta. Questo è anche lo slancio dietro l’intera guida di stile in primo luogo.

Chiunque scriva documentazione può sicuramente ancora infondere la propria personalità nella propria scrittura, e la discussione sui singoli argomenti di documentazione non va da nessuna parte, quindi quello è sempre un buon posto per rendere le cose più personali.

Tutto questo feedback è molto apprezzato :slight_smile:

2 Mi Piace

Per quanto riguarda la parte metablock della guida. Sebbene gli argomenti della documentazione ne abbiano bisogno secondo la guida sopra, non tutti gli argomenti ne hanno uno [1] e non sono sempre coerenti, ecco alcuni esempi da alcune guide che ho trovato.

Personalmente mi piace “Tutti gli utenti”

Non volevo cambiare questo negli argomenti prima di raccogliere qualche feedback :smiley:


  1. forse dipende dal contesto dell’argomento? ↩︎

4 Mi Piace

Tutta la documentazione di @Discourse è in fase di elaborazione e si spera che tutti ne avranno una a un certo punto (:crossed_fingers:). Ottimo punto sull’incoerenza, però. Non sono sicuro su quale atterreremo, ma ci assicureremo sicuramente di sceglierne una e di attenerci ad essa. :slight_smile:

4 Mi Piace

Devo anche aggiungere che chiunque veda il nuovo info-block incluso significa che ha superato la ‘fase 1’ ed è entrato nella fase di revisione, quindi se ne leggi uno e pensi ‘non è corretto’ o ‘mancano delle informazioni’ e ti senti abbastanza generoso da lasciare un feedback, aggiungi i tuoi pensieri a un post. :heart: :slight_smile:

5 Mi Piace

Qual è lo scopo delle informazioni sul livello utente richiesto in alto? Pensavo che fornisse informazioni sul fatto che il documento fosse rilevante per me o meno. Così potrei leggerlo e decidere “Non sono xxx, quindi non è rilevante”.
Ma sembra che venga utilizzato in modo diverso, perché ad esempio, gli utenti al di sotto di TL3 possono modificare le wiki, quindi è rilevante anche per altri.

3 Mi Piace

Grazie per averlo evidenziato @Moin: quell’argomento è stato aggiornato per correggere il livello utente richiesto.

La tua comprensione di ciò a cui servono tali informazioni è corretta: dovrebbe indicare quale livello o tipo di utente è in grado di eseguire le azioni spiegate nel documento.

1 Mi Piace