|
1 | 1 | # Symbiota Docs Documentation Style Guide
|
| 2 | +Please refer to and update this style guide to help maintain consistency across the user documentation for [Symbiota](https://github.com/BioKIC/Symbiota). |
2 | 3 |
|
3 |
| -Please refer to and update this style guide to help maintain consistency across the user documentation for [Symbiota](https://github.com/BioKIC/Symbiota). |
4 |
| - |
5 |
| -## Formatting conventions |
6 |
| - |
7 |
| -Top-level headings within documentation pages should use `##` and be sentence case. |
8 |
| - |
9 |
| -Use *italics* for filenames and for names of columns/fields, e.g. *basisOfRecord*. |
10 |
| - |
11 |
| -Enclose references to sample values in double quptation marks `"..."`, e.g. "PreservedSpecimen". |
12 |
| - |
13 |
| -Use *italics* and carrots for file paths as well as navigation paths, e.g. *My Profile > Occurrence Management > Administration Control Panel* or *Sitemap > Additional Resources > Glossary*. |
| 4 | +## Page-level Frontmatter |
| 5 | +Each page in Symbiota Docs should contain the following elements, some of which format the citation that appears at the bottom of each page: |
| 6 | +``` |
| 7 | +title: "Page Title in Title Case" |
| 8 | +date: 20XX-MM-DD |
| 9 | +weight: # |
| 10 | +draft: false |
| 11 | +authors: ["Firstname Lastname"] |
| 12 | +keywords: ["x", "y", "z", "etc"] |
| 13 | +``` |
| 14 | +- `date` should refer to the first day that the page was created, not modified (see below). |
| 15 | +- Title values shoule be succicent and often reflect an action, e.g. "Deleting Records". |
14 | 16 |
|
15 |
| -Use **bold** for emphasis, e.g. "After making an edit, **remember to save**". |
| 17 | +If a page is modified, add values for `lastmod` and `editors`: |
| 18 | +``` |
| 19 | +lastmod: 20XX-MM-DD |
| 20 | +editors: ["Firstname Lastname"] |
| 21 | +``` |
16 | 22 |
|
17 |
| -Format code snippets with \`...\`, e.g. `bundle exec jekyll serve`. |
| 23 | +Include a weight value (an integer) to organize the order in which a page's title appears within the left-hand navigation menu in Symbiota Docs: |
| 24 | +``` |
| 25 | +weight: # |
| 26 | +``` |
18 | 27 |
|
19 |
| -File extensions written as part of a filename are lowercase, e.g. *example.jpg*, but when written alone are uppercase, e.g. "the file should be a JPG." |
| 28 | +## Formatting Conventions |
20 | 29 |
|
21 | 30 | Introduce the topic on a page using classes, e.g.
|
22 | 31 | ```
|
23 | 32 | {{< notice info >}}
|
24 | 33 | This Symbiota Docs page is about...
|
25 | 34 | {{</ notice >}}
|
26 | 35 | ```
|
27 |
| -Or add tips: |
| 36 | +Or to add tips: |
28 | 37 | ```
|
29 | 38 | {{< notice tip >}}
|
30 | 39 | Here's a tip about this feature...
|
31 | 40 | {{</ notice >}}
|
32 | 41 | ```
|
33 | 42 |
|
34 |
| -## Including media in documentation pages |
| 43 | +Use _italics_ for |
| 44 | +- Filenames, e.g. _identifications.csv_ |
| 45 | +- Names of columns/fields, e.g. _Additional Identifier Value_ or _basisOfRecord_ |
| 46 | +- File and navigation paths, paired with carrots, e.g. _My Profile > Occurrence Management > Administration Control Panel_ or _Sitemap > Additional Resources > Glossary_ |
| 47 | + |
| 48 | +Use quotation marks `"..."` when referencing: |
| 49 | +- Example values, e.g. "PreservedSpecimen" |
| 50 | +- Buttons, e.g. "Create/Refresh Darwin Core Archive" |
35 | 51 |
|
| 52 | +Use capitalization for: |
| 53 | +- Tabs, e.g. Traits tab |
| 54 | +- Modules, e.g. Material Sample module |
| 55 | + |
| 56 | +Use **bold** for: |
| 57 | +- emphasis, e.g. "Before batch editing, remember to **backup your dataset**". |
| 58 | + |
| 59 | +Additionally: |
| 60 | +- Top-level headings within documentation pages should use `##` and should generally use title case. |
| 61 | +- Format code snippets with \`...\`, e.g. `bundle exec jekyll serve`. |
| 62 | +- File extensions written as part of a filename are lowercase, e.g. *example.jpg*, but when written alone are uppercase, e.g. "The file should be a JPG." |
| 63 | + |
| 64 | +## Including Media |
36 | 65 | To include a basic image with a caption, do so e.g.:
|
37 | 66 | ```
|
38 |
| -{% include figure image_path="/assets/images/lacmip-logo.jpg" alt="alt text goes here" caption="Figure caption text goes here." %} |
| 67 | +{% include figure image_path="/symbiota-docs/static/images/edittaxon.png" alt="alt text goes here" caption="Figure caption text goes here." %} |
| 68 | +``` |
| 69 | + |
| 70 | +``` |
| 71 | +|  | |
| 72 | +|:--:| |
| 73 | +| Caption. | |
39 | 74 | ```
|
40 | 75 |
|
41 | 76 | To include a basic image without a caption, do so e.g.:
|
42 | 77 | ```
|
43 |
| -<img src="{{ site.baseurl }}/assets/images/access_login.png" alt="" width="100"/>{: .align-right} |
| 78 | + |
| 79 | +``` |
| 80 | +To resize, align, or add an alt attribute (for screenreaders) to an image: |
| 81 | +``` |
| 82 | +<img src="/symbiota-docs/static/images/filename.png" alt="This image shows XYZ" width="100"/>{: .align-right} |
44 | 83 | ```
|
45 | 84 |
|
46 | 85 | To include a video, do so e.g.:
|
47 | 86 | ```
|
48 |
| -{% include video id="XsxDH4HcOWA" provider="youtube" %} |
| 87 | +{{< youtube ed2VEZCJwEI >}} |
49 | 88 | ```
|
50 | 89 |
|
51 |
| -## Page-level options |
52 |
| - |
53 |
| -There are several things you may wish to control at the page level by overwriting site defaults. These include... |
54 |
| -- remove the right-hand table of contents by including `toc: false` to the yml header of the page |
55 |
| -- create new headers by preceeding text on a new line with `#`; first- (`#`) and second-tier (`##`) headers will index in sidebar navigation |
56 |
| - |
57 |
| -## Naming files |
58 |
| - |
59 |
| -Markdown files being added to the *_documentation* collection should be named descriptively yet succinctly. Do not use any character other than a-z. |
| 90 | +## Naming Files |
| 91 | +Markdown files (.md) being added to Symbiota Docs should be named descriptively yet succinctly. Do not use any character other than `a-z`. |
60 | 92 |
|
61 |
| -Image files should be named descriptively. Recommendation is to name them according to the page they are being linked to, e.g. *labels_designs.jpg* is linked to the labels page. |
| 93 | +Image files should be named descriptively in lowercase. Do not use any character other than `a-z`, `-`, or `_`. Images (.png, .jpg) should be saved to `/symbiota-docs/tree/master/static/images`. |
62 | 94 |
|
63 |
| -## Other helpful resources |
| 95 | +## Related Resources |
64 | 96 | - [GitHub Formatting Syntax](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)
|
| 97 | +- [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) |
65 | 98 | - [Markdown Emojis Directory](https://gist.github.com/rxaviers/7360908)
|
0 commit comments