Skip to content

Commit e9df869

Browse files
authored
Merge pull request #237 from hughrun/main
meta
2 parents d30ca3d + 6281b98 commit e9df869

File tree

5 files changed

+150
-17
lines changed

5 files changed

+150
-17
lines changed

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,4 @@ View the main BookWyrm repository at [github.com/bookwyrm-social/bookwyrm](https
99
More information on contributing to the docs is available [within the docs themselves]([https://docs.joinbookwyrm.com/documentation.html):
1010

1111
* [Editing or creating a page](https://docs.joinbookwyrm.com/documentation.html#editing-or-creating-a-documentation-page)
12-
* [Building the docs locally to test output](https://docs.joinbookwyrm.com/documentation.html#building-docs-locally) (for testing)
13-
14-
## Translations
15-
16-
Maintainers of this repository can keep translations aligned by regularly updating from Crowdin:
17-
18-
1. Translations are updated in Crowdin
19-
2. Crowdin pushes new translations to l10n_main as they are available
20-
3. In your fork, `pull` both `main` and `l10n_main` so they are up to date in your local repository
21-
4. Create a new fork from `main` (e.g. called `update_locales`) and check it out
22-
5. merge `l10n_main`'s `locale` directory into your fork: `git checkout l10n_main -- locale`
23-
6. make adjustments if necessary
24-
7. push your local branch up to your remote and create a pull request
25-
8. pull the PR into `main`
26-
9. There is now a new reference file in en_US
27-
10. Using the changes in the new reference file, translations are updated in Crowdin...
12+
* [Building the docs locally to test the output](https://docs.joinbookwyrm.com/documentation.html#building-docs-locally)

content/contributing/documentation.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,32 @@ This runs a local web server at `http://[::1]:8080/` so you can see what the doc
119119
### black
120120

121121
This will run `black` to lint your files and avoid any issues with our automated checks. You are unlikely to need this if you are simply updating the documentation source files in `content`.
122+
123+
## Notes for documentation maintainers
124+
125+
### Translations
126+
127+
Keep translations aligned by regularly updating from Crowdin:
128+
129+
1. Translations are updated in Crowdin
130+
2. Crowdin pushes new translations to l10n_main as they are available
131+
3. In your fork, `pull` both `main` and `l10n_main` so they are up to date in your local repository
132+
4. Create a new fork from `main` (e.g. called `update_locales`) and check it out
133+
5. merge `l10n_main`'s `locale` directory into your fork: `git checkout l10n_main -- locale`
134+
6. make adjustments if necessary
135+
7. push your local branch up to your remote and create a pull request
136+
8. pull the PR into `main`
137+
9. There is now a new reference file in en_US
138+
10. Using the changes in the new reference file, translations are updated in Crowdin...
139+
140+
Locales for the language dropdown are listed in `i18n.py`. Generally we wait for a language to have 70% coverage in Crowdin before adding it to the list to avoid too much content remaining untranslated.
141+
142+
### Updating when a new version is released
143+
144+
When a new version of BookWyrm is released we need to create a new version of the docs:
145+
146+
1. Add a new branch with a name exactly matching the new version tag in BookWyrm. e.g. `v0.8.0`.
147+
2. Add that branch name to the list of versions in `generate.py` in the `main` branch of the docs
148+
3. Check out every other version in turn, and merge the updated generation file into it so they all have the new branch listed: `git checkout main generate.py`. Then commit this change, create a PR to merge this change into the version's branch in the docs, and merge it. This will ensure that all pages in all versions of the docs have every other version listed in the dropdown menu.
149+
150+
4. Merge the change in the `main` branch last - only merges into `main` trigger the GitHub action to deploy to the docs web server so if you do this first, the changes in other branches will have no effect.

site/404.html

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>404 Page Not Found</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link type="text/css" rel="stylesheet" href="/static/css/icons.css">
7+
<link type="text/css" rel="stylesheet" href="/static/css/bulma.min.css">
8+
<link type="text/css" rel="stylesheet" href="/static/css/bookwyrm.css?v076">
9+
<link rel="shortcut icon" type="image/x-icon" href="/static/images/favicon.ico">
10+
<meta charset="UTF-8">
11+
</head>
12+
<body>
13+
<nav class="navbar container is-max-desktop" aria-label="main navigation">
14+
<div class="navbar-brand">
15+
<a class="navbar-item" href="https://joinbookwyrm.com/">
16+
<img class="image logo" src="/static/images/logo-small.png" alt="Go back to the homepage">
17+
</a>
18+
<a href="/" class="navbar-item has-text-link has-text-weight-bold">
19+
Documentation
20+
</a>
21+
<a role="button" class="navbar-burger" data-target="main-nav" aria-label="menu" aria-expanded="false">
22+
<span aria-hidden="true"></span>
23+
<span aria-hidden="true"></span>
24+
<span aria-hidden="true"></span>
25+
<span aria-hidden="true"></span>
26+
</a>
27+
</div>
28+
29+
<div class="navbar-menu" id="main-nav">
30+
<div class="navbar-start">
31+
<a href="https://joinbookwyrm.com/instances" class="navbar-item">
32+
Join
33+
</a>
34+
<a href="https://joinbookwyrm.com/get-involved" class="navbar-item">
35+
Get involved
36+
</a>
37+
<a href="https://www.patreon.com/bookwyrm" class="navbar-item">
38+
Support
39+
</a>
40+
<a href="https://github.com/bookwyrm-social/bookwyrm" class="navbar-item">
41+
Code
42+
</a>
43+
</div>
44+
</div>
45+
</nav>
46+
47+
<main class="hero is-halfheight has-text-centered">
48+
<section class="m-auto">
49+
<h2 class="title">Oh dear!</h2>
50+
<p class="m-6">That page you are looking for is missing. This may be because it does not exist in the version of the documentation you were looking at.</p>
51+
<a href="/" class="button is-link">Go back to documentation</a>
52+
</section>
53+
</main>
54+
55+
<footer id="contentinfo" class="footer">
56+
<div class="container is-max-desktop">
57+
<div class="columns">
58+
<div class="column content">
59+
<p>
60+
<strong>BookWyrm</strong> is collaborative, anti-corporate software maintained by <a href='https://www.mousereeve.com/'>Mouse Reeve</a>.
61+
</p>
62+
<p>
63+
Support BookWyrm on <a href='https://www.patreon.com/bookwyrm' target='_blank'>Patreon</a>.
64+
</p>
65+
</div>
66+
<div class="column">
67+
<h3 class="title is-6">Get Involved</h3>
68+
<p>
69+
<a href="https://github.com/bookwyrm-social">BookWyrm on GitHub</a>
70+
</p>
71+
<p>
72+
<a href="https://github.com/bookwyrm-social/documentation/blob/main/content/using_bookwyrm/main-menu.md">Contribute to this page</a>
73+
</p>
74+
<p>
75+
<a href="https://twitter.com/BookWyrmSocial" target="_blank">
76+
<span class="icon icon-twitter"><span class="is-sr-only">Twitter</span></span>
77+
</a>
78+
<a href="https://tech.lgbt/@bookwyrm" target="_blank" rel="me">
79+
<span class="icon icon-mastodon"><span class="is-sr-only">Mastodon</span></span>
80+
</a>
81+
<a href="https://www.patreon.com/bookwyrm" target="_blank">
82+
<span class="icon icon-patreon"><span class="is-sr-only">Patreon</span></span>
83+
</a>
84+
</p>
85+
</div>
86+
<div class="column">
87+
<h3 class="title is-6">Learn more</h3>
88+
<p>
89+
<a href="https://docs.joinbookwyrm.com">Documentation</a>
90+
</p>
91+
<p>
92+
<a href="mailto:mousereeve@riseup.net">Contact maintainer</a>
93+
</p>
94+
<p>
95+
<a href="https://raw.githubusercontent.com/bookwyrm-social/join-bookwyrm/main/LICENSE.md">License</a>
96+
</p>
97+
</div>
98+
</div>
99+
</div>
100+
</footer>
101+
<script src="/static/js/burger.js"></script>
102+
</body>
103+
</html>

site/static/js/burger.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
document.addEventListener('DOMContentLoaded', () => {
2+
// Get "navbar-burger" element
3+
const el = document.querySelector('.navbar-burger');
4+
5+
// Add a click event
6+
el.addEventListener('click', () => {
7+
8+
// Get the targets from the "data-target" attribute
9+
const target = el.dataset.target;
10+
const $target = document.getElementById(target);
11+
12+
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
13+
el.classList.toggle('is-active');
14+
$target.classList.toggle('is-active');
15+
});
16+
});

templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</div>
6161
</nav>
6262
{% if not current_version %}
63-
<div class="message is-danger">
63+
<div class="message is-warning">
6464
<div class="message-body has-text-centered">
6565
{{ _("This is the documentation for the current development code. Choose a version from the menu to see documentation for released versions since") }} <strong>v0.7.5</strong>.
6666
</div>

0 commit comments

Comments
 (0)