Difference between revisions of "Style Guide"
(Created page with "<languages/> <translate> ==Overview== <!--T:1--> <!--T:2--> This page is a supplementary style guide for writing and editing technical documentation in MediaWiki and other te...") |
|||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | + | ==Overview== | |
− | This page is a supplementary style guide for writing and editing technical documentation in MediaWiki and other technical spaces. | + | |
− | + | This page is a supplementary style guide for writing and editing technical documentation in MediaWiki and other technical spaces. | |
− | + | ||
+ | |||
It is intended to provide tips for writing clear, concise technical documentation in plain language, to highlight best practices and standards for a variety of technical documents used across projects, to share resources and knowledge about technical writing and editing in general. | It is intended to provide tips for writing clear, concise technical documentation in plain language, to highlight best practices and standards for a variety of technical documents used across projects, to share resources and knowledge about technical writing and editing in general. | ||
− | + | "Good" technical documentation makes it easier for individuals to make technical contributions across Wikimedia projects. | |
− | "Good" technical documentation makes it easier for individuals to make technical contributions across Wikimedia projects. | + | |
− | |||
− | |||
Whether you consider yourself a writer or not, your contributions are needed and appreciated. | Whether you consider yourself a writer or not, your contributions are needed and appreciated. | ||
− | ===English Wikipedia Manual of Style=== < | + | ===English Wikipedia Manual of Style=== |
+ | The [[<tvar|1>https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style</>|English Wikipedia's Manual of style]] covers certain topics in detail (like punctuation) and summarizes the key points of others. | ||
+ | ===<span class="mw-headline" id="Additional_guidelines_for_technical_writing_and_editing">Additional guidelines for technical writing and editing</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span>[[/index.php?title=Style Guide&veaction=edit§ion=1|edit]]<span class="mw-editsection-divider"> | </span>[[/index.php?title=Style Guide&action=edit§ion=1|edit source]]<span class="mw-editsection-bracket">]</span></span>=== | ||
+ | It is important to follow clear standards and style guidelines for writing and editing documentation, especially when many individuals contribute to it with varying levels of skills and experience. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | There are many style and usage rules for general writing – far too many to remember – and even more for technical writing. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
This page provides basic guidelines and tips to help get you started, as well as some specific information not covered in the Wikipedia Manual of Style. | This page provides basic guidelines and tips to help get you started, as well as some specific information not covered in the Wikipedia Manual of Style. | ||
− | + | ||
{{TOC|align=right}} | {{TOC|align=right}} | ||
− | |||
== Audience and content == <!--T:13--> | == Audience and content == <!--T:13--> | ||
=== Writing for technical audiences === <!--T:14--> | === Writing for technical audiences === <!--T:14--> | ||
− | |||
Before you begin writing, it is important to think about the audience for your work. | Before you begin writing, it is important to think about the audience for your work. | ||
− | + | * Who do you imagine will be reading this technical documentation? | |
− | * Who do you imagine will be reading this technical documentation? | + | |
− | + | ||
− | + | * How familiar are they with the concepts you are presenting? | |
− | + | ||
− | |||
− | |||
− | * How familiar are they with the concepts you are presenting? | ||
− | |||
− | |||
* What might they need to know in order to understand? | * What might they need to know in order to understand? | ||
− | |||
Once you have an understanding of your audience, you will have a better sense of what you need to convey and how to convey it. | Once you have an understanding of your audience, you will have a better sense of what you need to convey and how to convey it. | ||
− | + | ||
{{tip|1=<nowiki/> | {{tip|1=<nowiki/> | ||
− | + | ||
− | + | * If you know your audience is ''highly technical and familiar'' with the processes you are describing, then you ''do not need to explain'' basic concepts. | |
− | * If you know your audience is ''highly technical and familiar'' with the processes you are describing, then you ''do not need to explain'' basic concepts. | + | |
− | |||
− | |||
* If you know your audience is ''learning or unfamiliar'' with the processes you are describing, then ''include explanations'' of basic concepts ''and links'' to additional information. | * If you know your audience is ''learning or unfamiliar'' with the processes you are describing, then ''include explanations'' of basic concepts ''and links'' to additional information. | ||
− | + | ||
}} | }} | ||
− | + | === Writing with a purpose === | |
− | === Writing with a purpose === | + | |
+ | What purpose will your technical documentation serve? There are many reasons to write documentation. | ||
− | |||
− | |||
− | |||
− | |||
It is helpful to know ''why'' you are writing and what your goal is before you begin. | It is helpful to know ''why'' you are writing and what your goal is before you begin. | ||
− | + | * Is it to teach someone, like a newcomer, about a process or concept? | |
− | * Is it to teach someone, like a newcomer, about a process or concept? | + | * Is it to show someone how to follow a process? |
− | + | ||
− | + | * Is it meant to provide background and context for a concept or process? | |
− | * Is it to show someone how to follow a process? | + | |
− | |||
− | |||
− | * Is it meant to provide background and context for a concept or process? | ||
− | |||
− | |||
* Is it a reference intended to provide information? | * Is it a reference intended to provide information? | ||
− | === Writing within a context === | + | === Writing within a context === |
− | + | When deciding what to write and how to frame it for your reader, it can help to define a context or occasion for your writing. | |
− | When deciding what to write and how to frame it for your reader, it can help to define a context or occasion for your writing. | + | |
− | + | Your communication takes place in the context of a bigger situation. | |
− | + | ||
− | Your communication takes place in the context of a bigger situation. | + | The context may be bounded by the era you are writing in, the type of technology available, your geographical location and culture, or the current culture and communication styles of the community you and your readers belong to. |
− | |||
− | |||
− | The context may be bounded by the era you are writing in, the type of technology available, your geographical location and culture, or the current culture and communication styles of the community you and your readers belong to. | ||
− | |||
− | |||
The occasion may be personal and arise from the situation that motivated you to create or improve a piece of documentation. | The occasion may be personal and arise from the situation that motivated you to create or improve a piece of documentation. | ||
− | + | For example, if you are writing technical documentation for Wikimedia projects, consider the culture created by the individuals who volunteer, and take part across them. | |
− | For example, if you are writing technical documentation for Wikimedia projects, consider the culture created by the individuals who volunteer, and take part across them. | ||
− | |||
− | |||
How could you best position your writing within the context of this community and its culture to create the most meaningful and useful technical documentation? | How could you best position your writing within the context of this community and its culture to create the most meaningful and useful technical documentation? | ||
− | === User testing and feedback === | + | === User testing and feedback === |
+ | Create technical documentation to communicate ideas and concepts to a real audience of users. | ||
+ | Naturally, this audience should play a critical role in how the documentation is shaped and reshaped. | ||
+ | Think about ways you can gather information about your users' experiences. | ||
+ | Take some time to answer the following questions: | ||
− | + | * Does your documentation include a mechanism for feedback? | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Can you engage in timely conversations with the audience to make improvements? | * Can you engage in timely conversations with the audience to make improvements? | ||
− | === Clarity and consistency === | + | === Clarity and consistency === |
− | + | Your goal is to make accessing, reading, and creating technical documentation for MediaWiki/Wikimedia easier and more intuitive by promoting clarity and consistency throughout. | |
− | Your goal is to make accessing, reading, and creating technical documentation for MediaWiki/Wikimedia easier and more intuitive by promoting clarity and consistency throughout. | ||
− | |||
− | |||
Technical documentation is written for a wide audience and edited by a variety of contributors. | Technical documentation is written for a wide audience and edited by a variety of contributors. | ||
− | + | Voice, tone, grammar usage, style, and format should be consistent across technical documentation and similar content collections. | |
− | Voice, tone, grammar usage, style, and format should be consistent across technical documentation and similar content collections. | ||
− | |||
− | |||
This helps readers learn how to navigate information and makes it easier for contributors to understand how to edit and add new information. | This helps readers learn how to navigate information and makes it easier for contributors to understand how to edit and add new information. | ||
− | === Deciding on a document type === | + | === Deciding on a document type === |
− | |||
{{see also|Documentation/Technical documentation templates and suggestions}} | {{see also|Documentation/Technical documentation templates and suggestions}} | ||
− | + | ||
− | |||
Identify your main audience, purpose, and context first to decide on the type of document you will create. | Identify your main audience, purpose, and context first to decide on the type of document you will create. | ||
− | + | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 183: | Line 126: | ||
|} | |} | ||
− | == Language == | + | ==Language== |
{{see also|wikiversity:Technical_writing_style|label 1=The "Writing clearly" article on Wikiversity}} | {{see also|wikiversity:Technical_writing_style|label 1=The "Writing clearly" article on Wikiversity}} | ||
This section briefly mentions some topics worth exploring elsewhere in more detail. | This section briefly mentions some topics worth exploring elsewhere in more detail. | ||
+ | |||
Always check your words and expressions against these criteria on [[wikt:|Wiktionary]]: Wiktionary entries cover hundreds of languages, explicitly state the grammatical and lexical features of words and their declensions, provide detailed context labels (including about jargon, UK vs. USA English) and expose how translatable terms are in hundreds of other languages. | Always check your words and expressions against these criteria on [[wikt:|Wiktionary]]: Wiktionary entries cover hundreds of languages, explicitly state the grammatical and lexical features of words and their declensions, provide detailed context labels (including about jargon, UK vs. USA English) and expose how translatable terms are in hundreds of other languages. | ||
− | === Plain English === | + | ===Plain English=== |
Please remember: many visitors to these pages are not native English speakers. | Please remember: many visitors to these pages are not native English speakers. | ||
For documentation written in English, [[w:en:Plain English |Plain English]] works best. | For documentation written in English, [[w:en:Plain English |Plain English]] works best. | ||
+ | |||
Clear writing is the most understandable by diverse audiences, and is also easiest to translate. | Clear writing is the most understandable by diverse audiences, and is also easiest to translate. | ||
There are a number of good tools for checking your writing, at [[m:Tech/News/Manual#Guidelines|Tech News' Writing Guidelines on Meta-Wiki.]] | There are a number of good tools for checking your writing, at [[m:Tech/News/Manual#Guidelines|Tech News' Writing Guidelines on Meta-Wiki.]] | ||
Line 200: | Line 145: | ||
'''Tips:''' | '''Tips:''' | ||
− | * Avoid ambiguity, jargon, and vague or complex wording. | + | *Avoid ambiguity, jargon, and vague or complex wording. |
− | * Use words your audience will understand, and enough words to convey your message. | + | *Use words your audience will understand, and enough words to convey your message. |
− | * Define terms that may not be obvious to individuals who are new to the subject matter you are writing about. | + | *Define terms that may not be obvious to individuals who are new to the subject matter you are writing about. |
− | * Keep paragraphs and sentences short and concise. | + | *Keep paragraphs and sentences short and concise. |
− | * Use contractions or don't. Be consistent. | + | *Use contractions or don't. Be consistent. |
− | === Voice and tone === | + | ===Voice and tone=== |
MediaWiki is a place where anyone can edit. | MediaWiki is a place where anyone can edit. | ||
Line 259: | Line 204: | ||
===Point of view=== | ===Point of view=== | ||
− | * Use [[:en:Grammatical_person|second person]] ("You" or assumed "You") when addressing your audience. | + | *Use [[:en:Grammatical_person|second person]] ("You" or assumed "You") when addressing your audience. |
− | * Avoid [[:en:Grammatical_person|first person]] ("I"), unless you are writing a FAQ with questions asked from the first person perspective. | + | *Avoid [[:en:Grammatical_person|first person]] ("I"), unless you are writing a FAQ with questions asked from the first person perspective. |
− | * Use an [[:en:Imperative_mood|imperative mood]] for most documentation focused on goals or process. | + | *Use an [[:en:Imperative_mood|imperative mood]] for most documentation focused on goals or process. |
− | == Structuring pages == | + | ==Structuring pages== |
− | === Overview === | + | ===Overview=== |
All pages should include an overview section that explains: | All pages should include an overview section that explains: | ||
− | # Purpose of the page | + | #Purpose of the page |
− | # Audience of the page | + | #Audience of the page |
− | # Prerequisites the reader will need to know before proceeding (Ex. a working knowledge of Python) | + | #Prerequisites the reader will need to know before proceeding (Ex. a working knowledge of Python) |
− | # Software or tools the reader will need to complete the processes or tasks outlined on the page (Ex. Java installed) | + | #Software or tools the reader will need to complete the processes or tasks outlined on the page (Ex. Java installed) |
− | # Use case, case study, a practical understanding of the product, service or tool in action. (optional) | + | #Use case, case study, a practical understanding of the product, service or tool in action. (optional) |
− | === Table of contents === | + | ===Table of contents=== |
− | * Each page should include a table of contents, so information can be accessed easily. | + | *Each page should include a table of contents, so information can be accessed easily. |
− | === Titles and headers === | + | ===Titles and headers=== |
− | * Use [[:en:Letter_case#Sentence_case | sentence case]] for headers. | + | *Use [[:en:Letter_case#Sentence_case | sentence case]] for headers. |
− | * Keep header fonts consistent throughout documentation. | + | *Keep header fonts consistent throughout documentation. |
− | * Optional use of [[:en:Help:Link#Section_linking_(anchors)|anchors]] to link sections or subsections in the same page. | + | *Optional use of [[:en:Help:Link#Section_linking_(anchors)|anchors]] to link sections or subsections in the same page. |
− | === Information flow === | + | ===Information flow=== |
Technical documentation pages should follow a consistent pattern across content collections. | Technical documentation pages should follow a consistent pattern across content collections. | ||
'''An ideal pattern''' for each page might be: | '''An ideal pattern''' for each page might be: | ||
− | * Page Title | + | |
− | * Introduction/Overview | + | *Page Title |
− | * Header | + | *Introduction/Overview |
− | ** Content | + | *Header |
− | *** Subhead if needed | + | **Content |
− | **** Content | + | ***Subhead if needed |
+ | ****Content | ||
==Formatting text== | ==Formatting text== | ||
Line 352: | Line 298: | ||
|- | |- | ||
|Variables | |Variables | ||
− | |{{tag|var|content=variable} | + | | {{tag |<nowiki>var|content=variable}</nowiki> |
<code><nowiki>''</nowiki></code>italics<code><nowiki>''</nowiki></code> | <code><nowiki>''</nowiki></code>italics<code><nowiki>''</nowiki></code> | ||
|<var>variable</var> | |<var>variable</var> | ||
Line 406: | Line 352: | ||
|} | |} | ||
− | === Links === | + | ===Links=== |
{{main|Help:Links}} | {{main|Help:Links}} | ||
Line 420: | Line 366: | ||
|Link to other MediaWiki pages | |Link to other MediaWiki pages | ||
| | | | ||
− | * <code><nowiki>[[Foo]]</nowiki></code> | + | *<code><nowiki>[[Foo]]</nowiki></code> |
− | * <code><nowiki>[[Foo|Bar]]</nowiki></code> | + | *<code><nowiki>[[Foo|Bar]]</nowiki></code> |
|[[MediaWiki]] | |[[MediaWiki]] | ||
|- | |- | ||
Line 432: | Line 378: | ||
|Link to page belonging to a different Wikimedia project | |Link to page belonging to a different Wikimedia project | ||
| | | | ||
− | * <code><nowiki>[[</nowiki>phab:''T2001''<nowiki>]]</nowiki></code> for tasks and project tags | + | *<code><nowiki>[[</nowiki>phab:''T2001''<nowiki>]]</nowiki></code> for tasks and project tags |
− | * <code><nowiki>[[</nowiki>mail:''wikitech-l''<nowiki>]]</nowiki></code> for mailing lists | + | *<code><nowiki>[[</nowiki>mail:''wikitech-l''<nowiki>]]</nowiki></code> for mailing lists |
− | * <code><nowiki>[[</nowiki>w:en:''foobar''<nowiki>]]</nowiki></code> to English Wikipedia articles | + | *<code><nowiki>[[</nowiki>w:en:''foobar''<nowiki>]]</nowiki></code> to English Wikipedia articles |
− | * <code><nowiki>[[</nowiki>wikitech:''foobar''<nowiki>]]</nowiki></code> for details about the WMF cluster. | + | *<code><nowiki>[[</nowiki>wikitech:''foobar''<nowiki>]]</nowiki></code> for details about the WMF cluster. |
|[[w:en:Documentation|Documentation page on Wikipedia]] | |[[w:en:Documentation|Documentation page on Wikipedia]] | ||
|- | |- | ||
Line 444: | Line 390: | ||
|} | |} | ||
− | + | === Templates === | |
− | === Templates === | ||
− | |||
{{See also|Documentation/Style guide/templates}} | {{See also|Documentation/Style guide/templates}} | ||
Line 454: | Line 398: | ||
Below are some common templates: | Below are some common templates: | ||
− | * {{tl|ApiEx}} for api.php request URLs | + | *{{tl|ApiEx}} for api.php request URLs |
− | * {{tl|Api help}} to transclude generated API documentation | + | *{{tl|Api help}} to transclude generated API documentation |
− | * {{tl|caution}}, {{tl|fixtext}}, {{tl|note}}, {{tl|tip}}, {{tl|todo}}, and {{tl|warning}} for styles of inline highlight boxes | + | *{{tl|caution}}, {{tl|fixtext}}, {{tl|note}}, {{tl|tip}}, {{tl|todo}}, and {{tl|warning}} for styles of inline highlight boxes |
− | * {{tl|fixme}}, {{tl|historical}}, {{tl|notice}}, {{tl|outdated}}, and {{tl|update}} for page/section message boxes | + | *{{tl|fixme}}, {{tl|historical}}, {{tl|notice}}, {{tl|outdated}}, and {{tl|update}} for page/section message boxes |
− | * {{tl|class doclink}}, {{tl|file doclink}}, and {{tl|js doclink}} to link to MediaWiki core's [https://doc.wikimedia.org/mediawiki-core/master/php/ generated documentation] | + | *{{tl|class doclink}}, {{tl|file doclink}}, and {{tl|js doclink}} to link to MediaWiki core's [https://doc.wikimedia.org/mediawiki-core/master/php/ generated documentation] |
− | * {{tl|git file}} to link to source code | + | *{{tl|git file}} to link to source code |
− | * {{tlx|irc|wikimedia-tech}} for IRC link | + | *{{tlx|irc|wikimedia-tech}} for IRC link |
− | * {{tl|Key press}} for, e.g. {{Key press|Ctrl|Shift|I}}, and {{tl|button}} for, e.g. {{button|{{int|showpreview}}}} | + | *{{tl|Key press}} for, e.g. {{Key press|Ctrl|Shift|I}}, and {{tl|button}} for, e.g. {{button|{{int|showpreview}}}} |
− | * {{tl|main}} and {{tl|see also}} for page/section hatnotes (a short note placed at the top of an article) | + | *{{tl|main}} and {{tl|see also}} for page/section hatnotes (a short note placed at the top of an article) |
− | * {{tl|MW file}} for a box with info and links for a file in MediaWiki core | + | *{{tl|MW file}} for a box with info and links for a file in MediaWiki core |
− | * {{tl|ptag}} for the top-right-of-page phabricator project tag | + | *{{tl|ptag}} for the top-right-of-page phabricator project tag |
− | * {{tl|tracked}} for the related Phabricator task | + | *{{tl|tracked}} for the related Phabricator task |
− | * {{tl|wg|RestOfVariableName}} for global variables | + | *{{tl|wg|RestOfVariableName}} for global variables |
− | * {{tl|tag}} for a quick way to mention an XML-style tag in a preformatted | + | *{{tl|tag}} for a quick way to mention an XML-style tag in a preformatted |
− | + | == Translations == | |
− | |||
− | == Translations == | ||
− | |||
All pages on mediawiki.org are candidates for translation into multiple languages. | All pages on mediawiki.org are candidates for translation into multiple languages. | ||
MediaWiki.org is a multilingual wiki, it uses the [[Extension:Translate|Translate extension]] to present alternative translations and [[Help:Extension:Translate/Page_translation_administration|manage the translation of pages]]. | MediaWiki.org is a multilingual wiki, it uses the [[Extension:Translate|Translate extension]] to present alternative translations and [[Help:Extension:Translate/Page_translation_administration|manage the translation of pages]]. | ||
{{tips|1= | {{tips|1= | ||
− | + | ||
− | + | * If a page has been translated, then click 'Edit source' to edit the entire page. [[<tvar|1>Special:MyLanguage/Help:Extension:Translate/Page_translation_administration#Markup_examples</>|Wrongly placed]] translation tag markers around section headings can confuse section editing, and as of July 2015 VisualEditor does not understand the following tags:{{tag|languages|open}}, {{tag|translate|open}}, {{tag|tvar|open}} | |
− | * If a page has been translated, then click 'Edit source' to edit the entire page. | + | |
− | + | * Do not copy and paste existing markup. If in doubt, focus on writing a good text and let someone else handle the Translate markup. | |
− | |||
− | * Do not copy and paste existing markup. | ||
}} | }} | ||
− | + | == Further information == | |
− | == Further information == | + | |
− | |||
*[[Documentation/Technical writer guide]] | *[[Documentation/Technical writer guide]] | ||
*[[Technical documentation prioritization]] | *[[Technical documentation prioritization]] | ||
− | + | == See also == | |
− | == See also == | + | |
− | |||
*[[Web APIs hub/Contributing]] – guide to writing articles for third-party developers | *[[Web APIs hub/Contributing]] – guide to writing articles for third-party developers | ||
− | * Some other technical documentation style guides: | + | *Some other technical documentation style guides: |
− | ** [https://rackerlabs.github.io/docs-rackspace Rackspace Style Guide] | + | **[https://rackerlabs.github.io/docs-rackspace Rackspace Style Guide] |
− | ** [https://developer.gnome.org/gdp-style-guide/ Gnome Documentation Style Guide] | + | **[https://developer.gnome.org/gdp-style-guide/ Gnome Documentation Style Guide] |
− | ** [https://developers.google.com/style/ Google Developer Documentation Style Guide] | + | **[https://developers.google.com/style/ Google Developer Documentation Style Guide] |
− | ** [https://developer.wordpress.com/themes/documentation-style-guide/ Wordpress Documentation Style Guide] | + | **[https://developer.wordpress.com/themes/documentation-style-guide/ Wordpress Documentation Style Guide] |
*[[Wikiversity:Technical writing]] | *[[Wikiversity:Technical writing]] | ||
− | + | == Footnotes == | |
− | == Footnotes == | ||
− | |||
− | |||
{{Conventions navigation}} | {{Conventions navigation}} | ||
− | [[Category:Documentation{{ | + | [[Category:Documentation{{|<nowiki>translation:}}</nowiki>]] |
Revision as of 14:24, 7 July 2020
Contents
Overview
This page is a supplementary style guide for writing and editing technical documentation in MediaWiki and other technical spaces.
It is intended to provide tips for writing clear, concise technical documentation in plain language, to highlight best practices and standards for a variety of technical documents used across projects, to share resources and knowledge about technical writing and editing in general.
"Good" technical documentation makes it easier for individuals to make technical contributions across Wikimedia projects.
Whether you consider yourself a writer or not, your contributions are needed and appreciated.
English Wikipedia Manual of Style
The [[<tvar|1>https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style</>|English Wikipedia's Manual of style]] covers certain topics in detail (like punctuation) and summarizes the key points of others.
Additional guidelines for technical writing and editing[edit | edit source]
It is important to follow clear standards and style guidelines for writing and editing documentation, especially when many individuals contribute to it with varying levels of skills and experience.
There are many style and usage rules for general writing – far too many to remember – and even more for technical writing.
This page provides basic guidelines and tips to help get you started, as well as some specific information not covered in the Wikipedia Manual of Style.
Audience and content
Writing for technical audiences
Before you begin writing, it is important to think about the audience for your work.
- Who do you imagine will be reading this technical documentation?
- How familiar are they with the concepts you are presenting?
- What might they need to know in order to understand?
Once you have an understanding of your audience, you will have a better sense of what you need to convey and how to convey it.
Writing with a purpose
What purpose will your technical documentation serve? There are many reasons to write documentation.
It is helpful to know why you are writing and what your goal is before you begin.
- Is it to teach someone, like a newcomer, about a process or concept?
- Is it to show someone how to follow a process?
- Is it meant to provide background and context for a concept or process?
- Is it a reference intended to provide information?
Writing within a context
When deciding what to write and how to frame it for your reader, it can help to define a context or occasion for your writing.
Your communication takes place in the context of a bigger situation.
The context may be bounded by the era you are writing in, the type of technology available, your geographical location and culture, or the current culture and communication styles of the community you and your readers belong to. The occasion may be personal and arise from the situation that motivated you to create or improve a piece of documentation.
For example, if you are writing technical documentation for Wikimedia projects, consider the culture created by the individuals who volunteer, and take part across them. How could you best position your writing within the context of this community and its culture to create the most meaningful and useful technical documentation?
User testing and feedback
Create technical documentation to communicate ideas and concepts to a real audience of users. Naturally, this audience should play a critical role in how the documentation is shaped and reshaped. Think about ways you can gather information about your users' experiences. Take some time to answer the following questions:
- Does your documentation include a mechanism for feedback?
- Can you engage in timely conversations with the audience to make improvements?
Clarity and consistency
Your goal is to make accessing, reading, and creating technical documentation for MediaWiki/Wikimedia easier and more intuitive by promoting clarity and consistency throughout. Technical documentation is written for a wide audience and edited by a variety of contributors.
Voice, tone, grammar usage, style, and format should be consistent across technical documentation and similar content collections. This helps readers learn how to navigate information and makes it easier for contributors to understand how to edit and add new information.
Deciding on a document type
Identify your main audience, purpose, and context first to decide on the type of document you will create.
Example Audience | Purpose[1] | Potential Document Types | Example |
---|---|---|---|
Newcomer interested in learning how to become a Toolforge user | To learn | Tutorial, FAQ, Getting Started guide | Cloud VPS and Toolforge FAQ |
Experienced technical contributor trying to work through a known problem | To achieve a goal | Walk-through, How-To guide | My First Flask OAuth Tool |
Individual trying to understand the history of ORES and how it evolved | To understand | Explanatory article, blog post | Artificial intelligence service “ORES” gives Wikipedians X-ray specs to see through bad edits |
A person looking for a definition of SSH keys | To inform | Reference guide, glossary | Glossary |
Language
This section briefly mentions some topics worth exploring elsewhere in more detail.
Always check your words and expressions against these criteria on Wiktionary: Wiktionary entries cover hundreds of languages, explicitly state the grammatical and lexical features of words and their declensions, provide detailed context labels (including about jargon, UK vs. USA English) and expose how translatable terms are in hundreds of other languages.
Plain English
Please remember: many visitors to these pages are not native English speakers.
For documentation written in English, Plain English works best.
Clear writing is the most understandable by diverse audiences, and is also easiest to translate. There are a number of good tools for checking your writing, at Tech News' Writing Guidelines on Meta-Wiki.
Tips:
- Avoid ambiguity, jargon, and vague or complex wording.
- Use words your audience will understand, and enough words to convey your message.
- Define terms that may not be obvious to individuals who are new to the subject matter you are writing about.
- Keep paragraphs and sentences short and concise.
- Use contractions or don't. Be consistent.
Voice and tone
MediaWiki is a place where anyone can edit. Thus, it can be difficult to maintain a consistent voice and tone in the documentation.
Consider using these elements in your writing:
Voice and tone | What this means | Instead of this | Try This |
---|---|---|---|
Friendly | Technical documentation does not need to sound academic or dry. Write to your audience as if they are there in person. | Before beginning, the user must create an account. | Start by creating an account. |
Professional | Technical documentation can be friendly, but should remain professional. | Don't make a bazillion changes. | Try to make minimum changes. |
Positive | Avoid using negative sentence constructions. Explain things in terms of what to do. It is harder to mentally parse a complex negative sentence! | N won't happen, if you don't XYZ. | To make N happen, do XYZ. |
Active | Try to use active voice, except when diplomacy calls for passive voice. | The extension must be registered. | You must register the extension. |
Non-gendered | Adopt gender-inclusive language. Assume your audience comprises all gender identities. | When he clicks Save | When the user clicks Save |
Inclusive | Use alternatives to common words or phrases that may unintentionally reinforce inappropriate stereotypes. | This UI is crazy. | This UI could be improved. |
Free of colloquialisms | It can be confusing to use colloquialisms, jokes, puns, or turns of phrase that non-native English speakers or individuals from other regions might not easily understand. | Creating a user account is a piece of cake. | It is easy to create a user account. |
Point of view
- Use second person ("You" or assumed "You") when addressing your audience.
- Avoid first person ("I"), unless you are writing a FAQ with questions asked from the first person perspective.
- Use an imperative mood for most documentation focused on goals or process.
Structuring pages
Overview
All pages should include an overview section that explains:
- Purpose of the page
- Audience of the page
- Prerequisites the reader will need to know before proceeding (Ex. a working knowledge of Python)
- Software or tools the reader will need to complete the processes or tasks outlined on the page (Ex. Java installed)
- Use case, case study, a practical understanding of the product, service or tool in action. (optional)
Table of contents
- Each page should include a table of contents, so information can be accessed easily.
Titles and headers
- Use sentence case for headers.
- Keep header fonts consistent throughout documentation.
- Optional use of anchors to link sections or subsections in the same page.
Information flow
Technical documentation pages should follow a consistent pattern across content collections.
An ideal pattern for each page might be:
- Page Title
- Introduction/Overview
- Header
- Content
- Subhead if needed
- Content
- Subhead if needed
- Content
Formatting text
Formatting code examples and other technical elements
Many situations call for text to be formatted in a way that distinguishes code and other technical elements from regular text.
Purpose | Wiki-Markup | Result | Situation |
---|---|---|---|
Code | <code>code</code>
|
code
|
Use for short strings of code, including wikitext markup.
Within |
Syntax highlight |
<syntaxhighlight lang="css"> .citation { margin: 0; } </syntaxhighlight> Text before |
.citation {
margin: 0;
}
Text before |
Use the <source lang="...">...</source> tag to document a few lines of code, and preserve whitespace and linebreaks. The inline attribute allows using it within an existing paragraph.
Note you cannot use italic in the middle of a See Extension:SyntaxHighlight for more details. |
Preformatted | <pre>preformatted text
|
preformatted text with indent |
Same as above (preserve whitespace and linebreaks), but without coloring. |
Keyboard input | <kbd>keyboard 123</kbd> (vs keyboard 123)
|
keyboard 123 (vs keyboard 123) | Use <kbd>...</kbd> for actual keyboard input - the text a user types into an input field or at a terminal command line. It displays in plain monospace.
|
Variables | var|content=variable}
|
variable
italics |
Use italics for variables like message-key-name and sample names like My page title.
Do not use punctuation such as <YOURPASSWORD>, because readers don't know the angle brackets are noise and will type them. |
Bold | ''' bold'''
|
bold | Generally only used for the first instance of the page-title, and for rare emphasis of keywords to enable easier skimming of lists or paragraphs.
Note: Sometimes bold is overused for emphasis. You may consider using a template instead, e.g. {{Caution}}, {{Note}}, or {{Warning}}. |
Quotations | " quotation marks"
Text before
Text after |
"quotation marks"
Text beforeText after |
Use quotation marks for brief pieces of content quoted from other sources.
Use blockquote for longer pieces of content. |
Abbreviations | JavaScript (JS)
|
JavaScript (JS)
JS |
You should define abbreviations the first time they are used. Use either plain text and parentheses, or the HTML abbr tag. |
Keypress | {{key press}}
|
Template:Key press | Showing specific keyboard presses or combinations. Extensive examples in VisualEditor/Portal/Keyboard shortcuts.
Note: This template might not exist on other wikis. |
Button | {{Button}}
|
Template:Button | Showing UI buttons that need to be clicked on.
Note: This template might not exist on other wikis. |
Links
Type | Purpose | How to implement | Example |
---|---|---|---|
Local | Link to other MediaWiki pages |
|
MediaWiki |
Translated Target | Link to other translated MediaWiki pages | [[Special:MyLanguage/Foo|Foo]]
|
How to contribute |
Interwiki | Link to page belonging to a different Wikimedia project |
|
Documentation page on Wikipedia |
External | Link to external pages | [https://www.example.org Example.org]
|
Example |
Templates
Templates are often used on Mediawiki.org pages. Templates can help to maintain consistency and can make it easier to translate information.
Below are some common templates:
- {{ApiEx}} for api.php request URLs
- {{Api help}} to transclude generated API documentation
- {{caution}}, {{fixtext}}, {{note}}, {{tip}}, {{todo}}, and {{warning}} for styles of inline highlight boxes
- {{fixme}}, {{historical}}, {{notice}}, {{outdated}}, and {{update}} for page/section message boxes
- {{class doclink}}, {{file doclink}}, and {{js doclink}} to link to MediaWiki core's generated documentation
- {{git file}} to link to source code
- {{irc|wikimedia-tech}} for IRC link
- {{Key press}} for, e.g. Template:Key press, and {{button}} for, e.g. Template:Button
- {{main}} and {{see also}} for page/section hatnotes (a short note placed at the top of an article)
- {{MW file}} for a box with info and links for a file in MediaWiki core
- {{ptag}} for the top-right-of-page phabricator project tag
- {{tracked}} for the related Phabricator task
- {{wg}} for global variables
- {{tag}} for a quick way to mention an XML-style tag in a preformatted
Translations
All pages on mediawiki.org are candidates for translation into multiple languages. MediaWiki.org is a multilingual wiki, it uses the Translate extension to present alternative translations and manage the translation of pages.
Further information
See also
- Web APIs hub/Contributing – guide to writing articles for third-party developers
- Some other technical documentation style guides:
- Wikiversity:Technical writing
Footnotes
Template:Conventions navigation
[[Category:Documentation{{|translation:}}]]