Skip to content
Snippets Groups Projects
Commit 3f7c469f authored by Jérôme Charaoui's avatar Jérôme Charaoui :telescope:
Browse files

service/blog: add proposed web-based workflow

Following a discussion during the last S9 meeting, I was asked to draft
ideas for a workflow for editing the new Lektor blog that avoids using
the command-line and the `git` command.
parent 3299655b
No related branches found
No related tags found
No related merge requests found
......@@ -81,3 +81,24 @@ A Discourse plugin can be configured to poll the blog website RSS/Atom feed at r
* **Hugo** is another friendly SSG, and a [Tor styleguide](https://github.com/irl/torproject-hugo) has been made for it, however its preferable to avoid using different web stacks unless there's a compelling reason for it. There's only one known [Drupal migration script](https://gohugo.io/tools/migrations/#drupal) by it appears to have been created for Drupal 7 and seems unmaintained. In any case it's "assembly required" which isn't much different from hacking a quick script to migrate to Lektor instead.
* **Discourse** might also be an option to completely replace the blog: we could configure https://blog.torproject.org to show content from a specific topic on Discourse. The challenge is that importing content is not as straightforward compared to a SSG where we just need to write text files. Maintaining existing URLs could also be a challenge and would require some form of redirect mapping on `blog.torproject.org`. We would also lose the flexibility to add standalone pages or other forms of content on the blog, ~~such as a calendar view of events~~ [event calendar plugin](https://meta.discourse.org/t/discourse-calendar/97376). ([example](https://www.daemon.com.au/))
## Proposed web-based workflow for Lektor
Creating new web content for a Lektor site essentially entails editing directories and text files and creating/pushing a new Git commit. This is quite different from the previous workflow in Drupal, so below are steps that can be followed to create new blog posts in Lektor using the GitLab web IDE:
1. Navigate to the GitLab blog project at https://gitlab.torproject.org/tpo/web/blog
2. Create a personal fork using the `Fork` button, at top right
3. Open the personal fork project and click the `Web IDE` button
4. On the left column, click the `New Directory` icon
5. Enter `content/blog/<blog-post-slug>` (`blog-post-slug` will be part of the blog post permalink)
6. In the left colum still, navigate to the new directory and open the drop-down menu to the right of the new directory item
7. Click `New file` to create a new file in that directory
8. Enter `contents.lr` as the new file name
9. In the text editor which appears, draft the new blog post (see below for template)
10. Upload any images or attachments as needed in `assets/static/images/blog`
11. When finished drafting the new blog post, click the blue `Commit` button, lower left
12. Select `Commit to main branch` and unselect `Start new merge request`
13. Within a few minutes, the CI should build and upload the draft version at `https://username.pages.torproject.net/blog`
14. Add more commits if any changes or adjustments are needed
15. Once the blog post is finalized, create a merge request from the forked project to the main project (eg. From `username/blog:main` into `tpo/web/blog:main`)
16. When the merge request is reviewed and accepted, the changes are merged and the new blog post is published
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment