halfway thru work/mastodon
This commit is contained in:
parent
c616dfd5fd
commit
dddc191e0c
5 changed files with 481 additions and 212 deletions
|
@ -35,7 +35,6 @@
|
|||
align-items: center;
|
||||
text-align: center;
|
||||
line-height: 1.4;
|
||||
z-index: -1;
|
||||
}
|
||||
.bubble:after {
|
||||
content: '';
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
@import "work/index.scss";
|
||||
@import "work/trilogy/index.scss";
|
||||
@import "work/mastodon/index.scss";
|
||||
|
||||
@import "partials/site-header.scss";
|
||||
@import "partials/site-footer.scss";
|
191
assets/scss/work/mastodon/index.scss
Normal file
191
assets/scss/work/mastodon/index.scss
Normal file
|
@ -0,0 +1,191 @@
|
|||
#mastodon {
|
||||
overflow: hidden;
|
||||
background: #16191f;
|
||||
color: #9baec8;
|
||||
.page-header {
|
||||
background: #3088D4;
|
||||
color: white;
|
||||
.container {
|
||||
display: grid;
|
||||
@media (min-width: 51.75em) {
|
||||
grid-template-columns: auto 1fr;
|
||||
}
|
||||
gap: 1em;
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 2em;
|
||||
line-height: 1.4;
|
||||
font-weight: 700;
|
||||
margin-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
.blurb {
|
||||
line-height: 1.4;
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 1.4em;
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
.subtitle {
|
||||
font-size: 1.6em;
|
||||
font-weight: 700;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.conversation {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
margin-bottom: 1.4em;
|
||||
iframe {
|
||||
width: 80ch
|
||||
}
|
||||
}
|
||||
#about {
|
||||
.container {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
gap: 1em;
|
||||
}
|
||||
.title {
|
||||
position: relative;
|
||||
&::before {
|
||||
content: 'About';
|
||||
position: absolute;
|
||||
top: -0.6em;
|
||||
left: -0.5em;
|
||||
font-size: 4em;
|
||||
font-weight: 900;
|
||||
opacity: 0.15;
|
||||
}
|
||||
}
|
||||
}
|
||||
#overview {
|
||||
.title {
|
||||
position: relative;
|
||||
&::before {
|
||||
content: 'Overview';
|
||||
position: absolute;
|
||||
top: -0.6em;
|
||||
left: -0.5em;
|
||||
font-size: 4em;
|
||||
font-weight: 900;
|
||||
opacity: 0.15;
|
||||
}
|
||||
}
|
||||
}
|
||||
#process {
|
||||
.title {
|
||||
position: relative;
|
||||
&::before {
|
||||
content: 'Process';
|
||||
position: absolute;
|
||||
top: -0.6em;
|
||||
left: -0.5em;
|
||||
font-size: 4em;
|
||||
font-weight: 900;
|
||||
opacity: 0.15;
|
||||
}
|
||||
}
|
||||
}
|
||||
#user {
|
||||
.subtitle {
|
||||
margin-top: 4em;
|
||||
margin-bottom: 2em;
|
||||
position: relative;
|
||||
&::before {
|
||||
content: '01';
|
||||
position: absolute;
|
||||
top: -0.4em;
|
||||
right: 0em;
|
||||
font-size: 4em;
|
||||
font-weight: 900;
|
||||
opacity: 0.15;
|
||||
}
|
||||
}
|
||||
.structure {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
#admin {
|
||||
.subtitle {
|
||||
margin-top: 4em;
|
||||
margin-bottom: 2em;
|
||||
position: relative;
|
||||
&::before {
|
||||
content: '02';
|
||||
position: absolute;
|
||||
top: -0.4em;
|
||||
right: 0em;
|
||||
font-size: 4em;
|
||||
font-weight: 900;
|
||||
opacity: 0.15;
|
||||
}
|
||||
}
|
||||
}
|
||||
.structure {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 2em;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 1em;
|
||||
ul {
|
||||
list-style-type: number;
|
||||
}
|
||||
li {
|
||||
margin-left: 1em;
|
||||
&::marker {
|
||||
font-weight: 700;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
}
|
||||
.old {
|
||||
.card__head {
|
||||
position: relative;
|
||||
&::before {
|
||||
content: 'OLD';
|
||||
position: absolute;
|
||||
top: -0.6em;
|
||||
right: -0.25em;
|
||||
font-size: 4em;
|
||||
font-weight: 900;
|
||||
opacity: 0.15;
|
||||
}
|
||||
}
|
||||
}
|
||||
.new {
|
||||
.card__head {
|
||||
position: relative;
|
||||
&::before {
|
||||
content: 'NEW';
|
||||
position: absolute;
|
||||
top: -0.6em;
|
||||
right: -0.25em;
|
||||
font-size: 4em;
|
||||
font-weight: 900;
|
||||
opacity: 0.15;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
p {column-span: 2}
|
||||
.card {
|
||||
background: #303643;
|
||||
color: #d9e1e8;
|
||||
padding: 2em;
|
||||
border-radius: 1em;
|
||||
&__head {
|
||||
font-weight: 700;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
&__body {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
gap: 0.5em;
|
||||
}
|
||||
}
|
||||
}
|
289
content/work/mastodon/index.html
Normal file
289
content/work/mastodon/index.html
Normal file
|
@ -0,0 +1,289 @@
|
|||
---
|
||||
title: "Mastodon documentation revamp"
|
||||
summary: "Reorganizing the documentation for the Mastodon Project, while also rewriting significant portions of it."
|
||||
author: "Abdullah Tarawneh"
|
||||
date: "2020-01-04"
|
||||
start: "Aug 2019"
|
||||
end: "Jan 2020"
|
||||
at: "Mastodon"
|
||||
position: "Information Architect / Documentation Specialist"
|
||||
tags: ["mastodon", "documentation", "information architecture", "rest api"]
|
||||
category: "Work"
|
||||
cover: "/images/mastodocs.jpg"
|
||||
---
|
||||
|
||||
<main id="mastodon">
|
||||
<header class="page-header section">
|
||||
<div class="container">
|
||||
<img src="/icons/mastodon.png" alt="">
|
||||
<h1 class="page-title">I reorganized and rewrote the docs for an open-source project with millions of users.</h1>
|
||||
</div>
|
||||
</header>
|
||||
<section class="section" id="about">
|
||||
<div class="container">
|
||||
<h2 class="title">About the client</h2>
|
||||
<p class="blurb"><a href="https://joinmastodon.org" target="_blank">Mastodon</a> is a free and libre open-source software project that aims to let anyone easily host their own Twitter-like social media website. Started in 2016, the project has since grown due to various migrations, usually spurred by the failures and mistakes of the dominant, centralized social platforms.</p>
|
||||
<p class="blurb">I have been using Mastodon since November 2016 -- you can <a href="https://mastodon.social/@trwnh" target="_blank">view my profile at mastodon.social/@trwnh</a> if you would like -- and I have grown to quite enjoy my experience there over the years. It reminds me a lot of the early days of Twitter... before <a href="/blog/twitter-not-social" target="_blank">they gave up on being a social network</a>, anyway.</p>
|
||||
<p class="blurb">One of the things I love most about the culture on there is that it's very much focused on people rather than content or engagement. This significantly lowers social friction and makes everyone more or less approachable. So approachable, in fact, that I could casually reply to the creator and founder of Mastodon and get this gig out of nowhere:</p>
|
||||
|
||||
<div class="conversation">
|
||||
|
||||
<iframe src="https://mastodon.social/@Gargron/102640868158739158/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://mastodon.social/embed.js" async="async"></script>
|
||||
|
||||
<iframe src="https://mastodon.social/@trwnh/102640952580526770/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://mastodon.social/embed.js" async="async"></script>
|
||||
|
||||
<iframe src="https://mastodon.social/@Gargron/102641022258942590/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://mastodon.social/embed.js" async="async"></script>
|
||||
|
||||
</div>
|
||||
|
||||
<p class="blurb">So... yeah, that's how this all happened.</p>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section" id="overview">
|
||||
<div class="container">
|
||||
<h2 class="title">So, what did all this entail?</h2>
|
||||
<section id="ia">
|
||||
<h3 class="subtitle">Information Architecture</h3>
|
||||
<p class="blurb"></p>
|
||||
</section>
|
||||
<section id="writing">
|
||||
<h3 class="subtitle">Documentation Writing</h3>
|
||||
<p class="blurb"></p>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section" id="process">
|
||||
<div class="container">
|
||||
<h2 class="title">Let me show you how I applied my process.</h2>
|
||||
<section id="user">
|
||||
<h3 class="subtitle">A brand new user guide</h3>
|
||||
<div class="structure">
|
||||
<div class="old card">
|
||||
<h4 class="card__head">User guide</h4>
|
||||
<ul class="card__body">
|
||||
<li>Basics</li>
|
||||
<li>Decentralization</li>
|
||||
<li>Privacy</li>
|
||||
<li>Moderation</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p class="blurb">Many of the pages in the old user guide did not actually deal with teaching people how to use Mastodon, so the content within them was reworked into a more general landing page that explained the benefits of Mastodon. This new landing page explains the basics of microblogging and federation, before moving into the practical implications that these decisions have for user freedom, privacy, and safety. Select quotations were included from previously published promotional material on the Mastodon blog.</p>
|
||||
|
||||
<p class="blurb">After this, an entirely new user guide was outlined from scratch, covering the user life cycle from start to end (or new beginning).</p>
|
||||
|
||||
<div class="structure">
|
||||
<div class="new card">
|
||||
<h4 class="card__head">Using Mastodon</h4>
|
||||
<ul class="card__body">
|
||||
<li>Signing up for a new account</li>
|
||||
<li>Setting up your profile</li>
|
||||
<li>Posting toots</li>
|
||||
<li>Using the network features</li>
|
||||
<li>Dealing with unwanted content</li>
|
||||
<li>Promoting yourself and others</li>
|
||||
<li>Set your preferences</li>
|
||||
<li>More settings</li>
|
||||
<li>Using Mastodon externally</li>
|
||||
<li>Moving or leaving accounts</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<section id="admin">
|
||||
<h3 class="subtitle">A more expressive admin guide</h3>
|
||||
<div class="structure">
|
||||
<div class="old card">
|
||||
<h4 class="card__head">Admin guide</h4>
|
||||
<ul class="card__body">
|
||||
<li>Installation</li>
|
||||
<li>Configuration</li>
|
||||
<li>Post-installation steps</li>
|
||||
<li>Scaling up</li>
|
||||
<li>Optional features</li>
|
||||
<li>Upgrading to a new release</li>
|
||||
<li>Migrating servers</li>
|
||||
<li>Troubleshooting</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="new card">
|
||||
<h4 class="card__head">Running Mastodon</h4>
|
||||
<ul class="card__body">
|
||||
<li>Preparing your machine</li>
|
||||
<li>Installing from source</li>
|
||||
<li>Configuring your environment</li>
|
||||
<li>Installing optional features</li>
|
||||
<li>Setting up your new instance</li>
|
||||
<li>Using the admin CLI</li>
|
||||
<li>Upgrading to a new release</li>
|
||||
<li>Backing up your server</li>
|
||||
<li>Migrating to a new machine</li>
|
||||
<li>Scaling up your server</li>
|
||||
<li>Moderation actions</li>
|
||||
<li>Troubleshooting errors</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p class="blurb">This section was mostly straightened out already, but could still use some improvements. A pre-installation page was split out from the old installation page. Backup instructions were moved out of "Optional features" and into a dedicated page. Pages were added for moderation and CLI usage.</p>
|
||||
</section>
|
||||
<section id="dev">
|
||||
<h3 class="subtitle">Giving developers actually useful information</h3>
|
||||
<div class="structure">
|
||||
<div class="old card">
|
||||
<h4 class="card__head">Development guide</h4>
|
||||
<ul class="card__body">
|
||||
<li>Overview</li>
|
||||
<li>ActivityPub compliance</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="structure">
|
||||
<div class="new card">
|
||||
<h4 class="card__head">Contributing to Mastodon</h4>
|
||||
<ul class="card__body">
|
||||
<li>Technical overview</li>
|
||||
<li>Setting up a dev environment</li>
|
||||
<li>Code structure</li>
|
||||
<li>Routes</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="new card">
|
||||
<h4 class="card__head">Spec compliance</h4>
|
||||
<ul class="card__body">
|
||||
<li>ActivityPub</li>
|
||||
<li>WebFinger</li>
|
||||
<li>Security</li>
|
||||
<li>Microformats</li>
|
||||
<li>OAuth</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
- Technical overview
|
||||
- Setting up a dev environment
|
||||
- Code structure
|
||||
- Routes
|
||||
|
||||
|
||||
|
||||
|
||||
The old "overview" page contained a mixture of information about setting up a dev environment, libraries used, code structure, and useful commands to run for testing.
|
||||
|
||||
The first step in cleaning this up was to split this page into multiple discrete pages, each with its own purpose. As "development" is a vague term, two new sections were created to replace it: one for client development (merged with API), and one for server development. The old "overview" pages were nested under the server development section, as they dealt primarily with server development.
|
||||
|
||||
Next, "ActivityPub compliance" was moved into a dedicated section for spec compliance, and pages were created for documenting how various significant specifications were used and implemented within Mastodon.
|
||||
|
||||
### API
|
||||
|
||||
```
|
||||
Old structure:
|
||||
"API overview"
|
||||
- Guidelines
|
||||
- Libraries
|
||||
- Authentication
|
||||
- Permissions
|
||||
- Entities
|
||||
- Parameters
|
||||
- Streaming API
|
||||
- Web Push API
|
||||
"REST API"
|
||||
- Accounts
|
||||
- Apps
|
||||
- ...
|
||||
- Timelines
|
||||
|
||||
New structure:
|
||||
"Developing Mastodon Apps"
|
||||
- Getting started with the API
|
||||
- Playing with public data
|
||||
- Obtaining client app access
|
||||
- Logging in with an account
|
||||
- Guidelines and best practices
|
||||
- Libraries and implementations
|
||||
"REST API"
|
||||
- OAuth scopes
|
||||
"API Methods"
|
||||
- apps
|
||||
- oauth
|
||||
- accounts
|
||||
- bookmarks
|
||||
- favourites
|
||||
- ...
|
||||
- statuses
|
||||
- media
|
||||
- ...
|
||||
- timelines
|
||||
- conversations
|
||||
- ...
|
||||
- streaming
|
||||
- notifications
|
||||
- push
|
||||
- search
|
||||
- instance
|
||||
- trends
|
||||
- directory
|
||||
- custom_emoji
|
||||
- admin
|
||||
- proofs
|
||||
- oembed
|
||||
"API Entities"
|
||||
- Account
|
||||
- ...
|
||||
- Token
|
||||
```
|
||||
|
||||
This was the majority of the work. Mastodon's REST API documentation was really messy, and it showed. Finding something generally entailed flipping back and forth between multiple pages and searching within them, and each page was very long.
|
||||
|
||||
The first step was to promote methods and entities into their own sections. The "Entities" page was split into multiple pages, one per entity, and alphabetized. Tables were converted into headings, to allow for providing more information about each field.
|
||||
|
||||
Methods were grouped by namespace rather than by feature-set, and with one level of nesting depending on whether the methods within pertained to accounts, statuses, timelines, notifications, etc. The pages for the Streaming and Web Push APIs were moved out of the overview section and into the methods section.
|
||||
|
||||
Finally, a new section was created for a client development guide. The guide would cover the basics of REST API, how to make requests, how responses are structured, and authentication/authorization.
|
||||
|
||||
## Technical writing
|
||||
|
||||
### User guide
|
||||
|
||||
With the information architecture phase done, writing the user guide was a straightforward task. Explanations of each feature and setting were added to the appropriate pages, as well as screenshots demonstrating proper usage. Tip boxes are included throughout in order to highlight important points.
|
||||
|
||||
### Client development guide
|
||||
|
||||
Writing this section taught me a lot about the basics of REST APIs, understanding HTTP requests and responses, providing parameters, and how OAuth works -- all information that I included in the client development guide.
|
||||
|
||||
### Routes
|
||||
|
||||
While documenting the REST API, I had to consult the Ruby on Rails routing config file extensively, so I took it as an opportunity to write a page about how routes work and how to read the routes file.
|
||||
|
||||
### Specification compliance
|
||||
|
||||
While the basics of ActivityPub federation were already written, the format of the old document simply pointed toward the server-to-server spec, as well as HTTP Signatures and Linked Data Signatures (with no real explanation beyond that). Therefore, I rewrote this page into multiple separate pages, each detailing the spec in question. The "ActivityPub" page now covered status federation and profile federation, the properties and types used in each, HTML payload sanitization, namespacing, and extensions (with sample payloads). "WebFinger" explained what, why, and how to use WebFinger for actor URI resolution. "Security" explained HTTP and LD signatures. "Microformats" explained the use of Microformats 2.0 and how they may be parsed, and "OAuth" covered the endpoints and flows implemented within Mastodon for obtaining a token.
|
||||
|
||||
### REST API
|
||||
|
||||
Methods now include the HTTP verb, endpoint, description, return type, OAuth scope, version history, request parameters, and sample response code and payload.
|
||||
|
||||
Entities now include example payloads, as well as eacha ttribute and its description, type, and version history.
|
||||
|
||||
## Outcomes
|
||||
|
||||
> "Bless you for being here to work on the docs btw. It's a big relief."
|
||||
|
||||
### Less missing information
|
||||
|
||||
During the information architecture phase, a new skeleton was created as a proposed alternative structure. This process made the existing gaps in the old structure more obvious, and therefore those gaps could be filled during the technical writing phase.
|
||||
|
||||
### Easier to make additions in an appropriate place
|
||||
|
||||
Pages that were added after completion:
|
||||
|
||||
- "Rate limits" was added under "REST API", describing how to deal with rate limits on requests made to the REST API.
|
||||
- "Bug bounties and responsible disclosure" was added under "Contributing to Mastodon", describing where serious issues should be reported if found.
|
||||
- "Running your own server" was added under "Using Mastodon", describing the reasons why a user might want to run their own server and linking to the "Running Mastodon" section.
|
||||
|
||||
The clear structure left in place by my information architecture work meant that it was almost immediately clear where to add these pages.
|
|
@ -1,211 +0,0 @@
|
|||
---
|
||||
title: "Mastodon documentation revamp"
|
||||
summary: "Reorganizing the documentation for the Mastodon Project, while also rewriting significant portions of it."
|
||||
author: "Abdullah Tarawneh"
|
||||
date: "2020-01-04"
|
||||
start: "Aug 2019"
|
||||
end: "Jan 2020"
|
||||
at: "Mastodon"
|
||||
position: "Information Architect / Documentation Specialist"
|
||||
tags: ["mastodon", "documentation", "information architecture", "rest api"]
|
||||
category: "Work"
|
||||
cover: "/images/mastodocs.jpg"
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
The project had two phases -- first, I had to identify what was missing or could be improved from the old docs; second, I had to come up with a new structure and write all that documentation.
|
||||
|
||||
## Information architecture
|
||||
|
||||
### User guide
|
||||
|
||||
```
|
||||
Old structure: "User Guide"
|
||||
- Basics
|
||||
- Decentralization
|
||||
- Privacy
|
||||
- Moderation
|
||||
|
||||
New structure: "Using Mastodon"
|
||||
- Signing up for a new account
|
||||
- Setting up your profile
|
||||
- Posting toots
|
||||
- Using the network features
|
||||
- Dealing with unwanted content
|
||||
- Promoting yourself and others
|
||||
- Set your preferences
|
||||
- More settings
|
||||
- Using Mastodon externally
|
||||
- Moving or leaving accounts
|
||||
```
|
||||
|
||||
Many of the pages in the old user guide did not actually deal with teaching people how to use Mastodon, so the content within them was reworked into a more general landing page that explained the benefits of Mastodon. This new landing page explains the basics of microblogging and federation, before moving into the practical implications that these decisions have for user freedom, privacy, and safety. Select quotations were included from previously published promotional material on the Mastodon blog.
|
||||
|
||||
After this, an entirely new user guide was outlined from scratch, covering the user life cycle from start to end (or new beginning).
|
||||
|
||||
### Admin guide
|
||||
|
||||
```
|
||||
Old structure: "Admin guide"
|
||||
- Installation
|
||||
- Configuration
|
||||
- Post-installation steps
|
||||
- Scaling up
|
||||
- Optional features
|
||||
- Upgrading to a new release
|
||||
- Migrating servers
|
||||
- Troubleshooting
|
||||
|
||||
New structure: "Running Mastodon"
|
||||
- Preparing your machine
|
||||
- Installing from source
|
||||
- Configuring your environment
|
||||
- Installing optional features
|
||||
- Setting up your new instance
|
||||
- Using the admin CLI
|
||||
- Upgrading to a new release
|
||||
- Backing up your server
|
||||
- Migrating to a new machine
|
||||
- Scaling up your server
|
||||
- Moderation actions
|
||||
- Troubleshooting errors
|
||||
```
|
||||
|
||||
This section was mostly straightened out already, but could still use some improvements. A pre-installation page was split out from the old installation page. Backup instructions were moved out of "Optional features" and into a dedicated page. Pages were added for moderation and CLI usage.
|
||||
|
||||
### Development guide
|
||||
|
||||
```
|
||||
Old structure: "Development guide"
|
||||
- Overview
|
||||
- ActivityPub compliance
|
||||
|
||||
New structure:
|
||||
"Contributing to Mastodon"
|
||||
- Technical overview
|
||||
- Setting up a dev environment
|
||||
- Code structure
|
||||
- Routes
|
||||
"Spec compliance"
|
||||
- ActivityPub
|
||||
- WebFinger
|
||||
- Security
|
||||
- Microformats
|
||||
- OAuth
|
||||
```
|
||||
|
||||
The old "overview" page contained a mixture of information about setting up a dev environment, libraries used, code structure, and useful commands to run for testing.
|
||||
|
||||
The first step in cleaning this up was to split this page into multiple discrete pages, each with its own purpose. As "development" is a vague term, two new sections were created to replace it: one for client development (merged with API), and one for server development. The old "overview" pages were nested under the server development section, as they dealt primarily with server development.
|
||||
|
||||
Next, "ActivityPub compliance" was moved into a dedicated section for spec compliance, and pages were created for documenting how various significant specifications were used and implemented within Mastodon.
|
||||
|
||||
### API
|
||||
|
||||
```
|
||||
Old structure:
|
||||
"API overview"
|
||||
- Guidelines
|
||||
- Libraries
|
||||
- Authentication
|
||||
- Permissions
|
||||
- Entities
|
||||
- Parameters
|
||||
- Streaming API
|
||||
- Web Push API
|
||||
"REST API"
|
||||
- Accounts
|
||||
- Apps
|
||||
- ...
|
||||
- Timelines
|
||||
|
||||
New structure:
|
||||
"Developing Mastodon Apps"
|
||||
- Getting started with the API
|
||||
- Playing with public data
|
||||
- Obtaining client app access
|
||||
- Logging in with an account
|
||||
- Guidelines and best practices
|
||||
- Libraries and implementations
|
||||
"REST API"
|
||||
- OAuth scopes
|
||||
"API Methods"
|
||||
- apps
|
||||
- oauth
|
||||
- accounts
|
||||
- bookmarks
|
||||
- favourites
|
||||
- ...
|
||||
- statuses
|
||||
- media
|
||||
- ...
|
||||
- timelines
|
||||
- conversations
|
||||
- ...
|
||||
- streaming
|
||||
- notifications
|
||||
- push
|
||||
- search
|
||||
- instance
|
||||
- trends
|
||||
- directory
|
||||
- custom_emoji
|
||||
- admin
|
||||
- proofs
|
||||
- oembed
|
||||
"API Entities"
|
||||
- Account
|
||||
- ...
|
||||
- Token
|
||||
```
|
||||
|
||||
This was the majority of the work. Mastodon's REST API documentation was really messy, and it showed. Finding something generally entailed flipping back and forth between multiple pages and searching within them, and each page was very long.
|
||||
|
||||
The first step was to promote methods and entities into their own sections. The "Entities" page was split into multiple pages, one per entity, and alphabetized. Tables were converted into headings, to allow for providing more information about each field.
|
||||
|
||||
Methods were grouped by namespace rather than by feature-set, and with one level of nesting depending on whether the methods within pertained to accounts, statuses, timelines, notifications, etc. The pages for the Streaming and Web Push APIs were moved out of the overview section and into the methods section.
|
||||
|
||||
Finally, a new section was created for a client development guide. The guide would cover the basics of REST API, how to make requests, how responses are structured, and authentication/authorization.
|
||||
|
||||
## Technical writing
|
||||
|
||||
### User guide
|
||||
|
||||
With the information architecture phase done, writing the user guide was a straightforward task. Explanations of each feature and setting were added to the appropriate pages, as well as screenshots demonstrating proper usage. Tip boxes are included throughout in order to highlight important points.
|
||||
|
||||
### Client development guide
|
||||
|
||||
Writing this section taught me a lot about the basics of REST APIs, understanding HTTP requests and responses, providing parameters, and how OAuth works -- all information that I included in the client development guide.
|
||||
|
||||
### Routes
|
||||
|
||||
While documenting the REST API, I had to consult the Ruby on Rails routing config file extensively, so I took it as an opportunity to write a page about how routes work and how to read the routes file.
|
||||
|
||||
### Specification compliance
|
||||
|
||||
While the basics of ActivityPub federation were already written, the format of the old document simply pointed toward the server-to-server spec, as well as HTTP Signatures and Linked Data Signatures (with no real explanation beyond that). Therefore, I rewrote this page into multiple separate pages, each detailing the spec in question. The "ActivityPub" page now covered status federation and profile federation, the properties and types used in each, HTML payload sanitization, namespacing, and extensions (with sample payloads). "WebFinger" explained what, why, and how to use WebFinger for actor URI resolution. "Security" explained HTTP and LD signatures. "Microformats" explained the use of Microformats 2.0 and how they may be parsed, and "OAuth" covered the endpoints and flows implemented within Mastodon for obtaining a token.
|
||||
|
||||
### REST API
|
||||
|
||||
Methods now include the HTTP verb, endpoint, description, return type, OAuth scope, version history, request parameters, and sample response code and payload.
|
||||
|
||||
Entities now include example payloads, as well as eacha ttribute and its description, type, and version history.
|
||||
|
||||
## Outcomes
|
||||
|
||||
> "Bless you for being here to work on the docs btw. It's a big relief."
|
||||
|
||||
### Less missing information
|
||||
|
||||
During the information architecture phase, a new skeleton was created as a proposed alternative structure. This process made the existing gaps in the old structure more obvious, and therefore those gaps could be filled during the technical writing phase.
|
||||
|
||||
### Easier to make additions in an appropriate place
|
||||
|
||||
Pages that were added after completion:
|
||||
|
||||
- "Rate limits" was added under "REST API", describing how to deal with rate limits on requests made to the REST API.
|
||||
- "Bug bounties and responsible disclosure" was added under "Contributing to Mastodon", describing where serious issues should be reported if found.
|
||||
- "Running your own server" was added under "Using Mastodon", describing the reasons why a user might want to run their own server and linking to the "Running Mastodon" section.
|
||||
|
||||
The clear structure left in place by my information architecture work meant that it was almost immediately clear where to add these pages.
|
Loading…
Reference in a new issue