... | @@ -114,14 +114,59 @@ title: Blog |
... | @@ -114,14 +114,59 @@ title: Blog |
|
* This will trigger the Discourse forum to create a new topic with the contents
|
|
* This will trigger the Discourse forum to create a new topic with the contents
|
|
of the blog post in the [News][] category.
|
|
of the blog post in the [News][] category.
|
|
|
|
|
|
* Adjustments to the topic source HTML could be needed to allow the forum to
|
|
* Adjustments to the topic source HTML might be required, notably to allow the
|
|
display images correctly (known Discourse bug being worked on)
|
|
forum to display images correctly (known Discourse bug being worked on)
|
|
|
|
|
|
[News]: https://forum.torproject.net/c/news/11
|
|
[News]: https://forum.torproject.net/c/news/11
|
|
|
|
|
|
|
|
# How-to
|
|
|
|
|
|
|
|
## Pager playbook
|
|
|
|
|
|
|
|
### Roll-back to pevious version
|
|
|
|
|
|
|
|
In case an undesirable change has been accidentally deployed to production, it's
|
|
|
|
possible to trigger a roll-back of the environment to the previous state. To do
|
|
|
|
this, navigate to the [Environments][] page, identify which version to roll-back
|
|
|
|
to and click the corresponding `Rollback environment` button in the left-most
|
|
|
|
column.
|
|
|
|
|
|
|
|
Please note that it's not possible to roll-back to an environment that was built
|
|
|
|
more than 1 week ago, because environments depend on build artifacts and those
|
|
|
|
are configured to expire after 1 week.
|
|
|
|
|
|
|
|
### Emergency modification
|
|
|
|
|
|
|
|
To modify the site in an emergency, it's possible to bypass GitLab completely and
|
|
|
|
edit the site HTML directly. The steps to do so are described here:
|
|
|
|
|
|
|
|
1. Log-in to `static-gitlab-shim.torproject.org`
|
|
|
|
2. `cd /srv/static-gitlab-shim/blog.torproject.org/public`
|
|
|
|
3. Edit the website sources files directly, in-place
|
|
|
|
4. Execute `sudo -u mirroradm static-update-component blog.torproject.org`
|
|
|
|
|
|
|
|
This will immediately deploy changes to the web mirrors.
|
|
|
|
|
|
|
|
Please note that using the technique, any changes made henceforth to the GitLab
|
|
|
|
project repository and deployed to production will overwrite these modifications.
|
|
|
|
|
|
|
|
## Disaster recovery
|
|
|
|
|
|
|
|
See [howto/static-component#disaster-recovery](https://gitlab.torproject.org/tpo/tpa/team/-/wikis/howto/static-component#disaster-recovery).
|
|
|
|
|
|
# Reference
|
|
# Reference
|
|
|
|
|
|
## Sample contents.lr
|
|
## Installation
|
|
|
|
|
|
|
|
See [service/static-shim#adding-a-new-static-site-shim-in-puppet](https://gitlab.torproject.org/tpo/tpa/team/-/wikis/service/static-shim#adding-a-new-static-site-shim-in-puppet).
|
|
|
|
|
|
|
|
## SLA
|
|
|
|
|
|
|
|
See [howto/static-component#sla](https://gitlab.torproject.org/tpo/tpa/team/-/wikis/howto/static-component#sla).
|
|
|
|
|
|
|
|
## Design
|
|
|
|
|
|
|
|
### Sample contents.lr
|
|
|
|
|
|
```
|
|
```
|
|
title: New Tor Blog
|
|
title: New Tor Blog
|
... | @@ -141,7 +186,7 @@ The new Tor Blog is here! |
... | @@ -141,7 +186,7 @@ The new Tor Blog is here! |
|
The new Tor Blog now runs on top of the Lektor static site generator.
|
|
The new Tor Blog now runs on top of the Lektor static site generator.
|
|
```
|
|
```
|
|
|
|
|
|
## List of categories
|
|
### List of categories
|
|
|
|
|
|
In the process of migrating the blog from Drupal to Lektor, the number of tags
|
|
In the process of migrating the blog from Drupal to Lektor, the number of tags
|
|
has been reduced to 20 (from over 970 in Drupal). For details about this work,
|
|
has been reduced to 20 (from over 970 in Drupal). For details about this work,
|
... | @@ -165,7 +210,7 @@ The items below may now be used in the `categories` field: |
... | @@ -165,7 +210,7 @@ The items below may now be used in the `categories` field: |
|
When drafting a new blog post, a minimum of one category must be chosen, with a
|
|
When drafting a new blog post, a minimum of one category must be chosen, with a
|
|
suggested maximum of three.
|
|
suggested maximum of three.
|
|
|
|
|
|
## Compress PNG files
|
|
### Compress PNG files
|
|
|
|
|
|
When care is taken to minimize the size of web assets, accessibility and
|
|
When care is taken to minimize the size of web assets, accessibility and
|
|
performance is improved, especially for visitors accessing the site from
|
|
performance is improved, especially for visitors accessing the site from
|
... | @@ -181,7 +226,7 @@ This command will process the input file and save it as `zopfli_lead.png`. The |
... | @@ -181,7 +226,7 @@ This command will process the input file and save it as `zopfli_lead.png`. The |
|
output message will indicate if the image size was reduced and if so, by what
|
|
output message will indicate if the image size was reduced and if so, by what
|
|
percentage.
|
|
percentage.
|
|
|
|
|
|
## Comments embedding
|
|
### Comments embedding
|
|
|
|
|
|
When a new blog post is published, a javascript snippet included on the page will
|
|
When a new blog post is published, a javascript snippet included on the page will
|
|
trigger the Discourse forum to create a new topic in the `News` category with the
|
|
trigger the Discourse forum to create a new topic in the `News` category with the
|
... | @@ -202,6 +247,33 @@ sub-elements themselves must be targetted explicitely. |
... | @@ -202,6 +247,33 @@ sub-elements themselves must be targetted explicitely. |
|
|
|
|
|
[Embedding]:https://forum.torproject.net/admin/customize/embedding
|
|
[Embedding]:https://forum.torproject.net/admin/customize/embedding
|
|
|
|
|
|
|
|
## Maintainer, users, and upstream
|
|
|
|
|
|
|
|
This website is maintained collaboratively between the TPA web team and the
|
|
|
|
community team. Users of this service are the general public.
|
|
|
|
|
|
|
|
## Monitoring and testing
|
|
|
|
|
|
|
|
For monitoring, see [howto/static-component#monitoring-and-testing](https://gitlab.torproject.org/tpo/tpa/team/-/wikis/howto/static-component#monitoring-and-testing).
|
|
|
|
|
|
|
|
There are no automated tests such as spellchecks or dead link checking for this
|
|
|
|
service. In case of malformed Lektor content files, the build job will fail.
|
|
|
|
|
|
|
|
## Logs and metrics
|
|
|
|
|
|
|
|
See [howto/static-component#logs-and-metrics](https://gitlab.torproject.org/tpo/tpa/team/-/wikis/howto/static-component#logs-and-metrics).
|
|
|
|
|
|
|
|
## Backups
|
|
|
|
|
|
|
|
Backups of this website exist both in the Bacula backups of the GitLab server (as
|
|
|
|
artifacts) and backups of the `static-gitlab-shim.torproject.org` server.
|
|
|
|
|
|
|
|
## Other documentation
|
|
|
|
|
|
|
|
* [howto/static-component](https://gitlab.torproject.org/tpo/tpa/team/-/wikis/howto/static-component)
|
|
|
|
* [service/static-shim](https://gitlab.torproject.org/tpo/tpa/team/-/wikis/service/static-shim)
|
|
|
|
* [Lektor documentation](https://www.getlektor.com/docs/)
|
|
|
|
|
|
# Discussion
|
|
# Discussion
|
|
|
|
|
|
## Drupal to Lektor migration
|
|
## Drupal to Lektor migration
|
... | | ... | |