... | ... | @@ -8,38 +8,89 @@ title: Blog |
|
|
|
|
|
## Writing a new blog post
|
|
|
|
|
|
1. Navigate to the GitLab blog project at https://gitlab.torproject.org/tpo/web/blog/-/branches
|
|
|
**1. Navigate to the GitLab blog project at https://gitlab.torproject.org/tpo/web/blog/-/branches**
|
|
|
|
|
|
* To create a new branch, your account will require `Developper` permissions on the project
|
|
|
* To create a new branch, your account will require `Developper` permissions
|
|
|
on the project
|
|
|
|
|
|
2. Click the blue `New branch` button on the top left corner of the page
|
|
|
**2. Click the blue `New branch` button on the top left corner of the page**
|
|
|
|
|
|
3. Enter a short name for the branch, without spaces
|
|
|
**3. Enter a short name for the branch, without spaces**
|
|
|
|
|
|
* `Create from` should be left to `main`
|
|
|
|
|
|
4. Click the `Web IDE` button just above the file listing
|
|
|
**4. Click the `Web IDE` button just above the file listing**
|
|
|
|
|
|
4. On the left column, click the `New Directory` icon
|
|
|
* The GitLab Web IDE allows you to create a new commit right in your browser,
|
|
|
without the `git` command-line client
|
|
|
|
|
|
6. Enter `content/blog/<blog-post-slug>`
|
|
|
**5. On the left column, click the `New Directory` icon**
|
|
|
|
|
|
* `blog-post-slug` will form the URL part after `https://blog.torproject.org/` (also called the permalink)
|
|
|
**6. Enter `content/blog/<blog-post-slug>`**
|
|
|
|
|
|
7. In the left column still, navigate to the new directory and open the drop-down menu to the right of the new directory item
|
|
|
* `<blog-post-slug>` will constitute the URL part after
|
|
|
`https://blog.torproject.org/` (also called the permalink)
|
|
|
|
|
|
8. Click `New file` to create a new file in that directory
|
|
|
**7. In the left column still, navigate to the new directory and open the
|
|
|
drop-down menu to the right of the new directory item**
|
|
|
|
|
|
9. Enter `contents.lr` as the new file name
|
|
|
**8. Click `New file` to create a new file in that directory**
|
|
|
|
|
|
**9. Enter `contents.lr` as the new file name**
|
|
|
|
|
|
**10. In the text editor which appears, draft the new blog post**
|
|
|
|
|
|
* Markdown is accepted in `summary` and `body` fields (see below for
|
|
|
a template)
|
|
|
|
|
|
**11. Upload the lead image and any other inline images in the same directory**
|
|
|
|
|
|
* The lead image must be uploaded as `lead.png`, `lead.jpg` or `lead.gif`
|
|
|
|
|
|
* A default Tor logo image will be displayed if the lead image is omitted
|
|
|
|
|
|
* Image widths should not exceed 1000 pixels
|
|
|
|
|
|
* If you can, please compress your PNG files using a tool such as `zopflipng`
|
|
|
|
|
|
* Don't worry about uploading duplicate images from other posts, as they will
|
|
|
be deduplicated in GitLab (just make sure not to modify them unless
|
|
|
necessary)
|
|
|
|
|
|
**12. When finished drafting the new blog post, click the blue `Commit..`
|
|
|
button, lower left**
|
|
|
|
|
|
**13. `Commit to <branchname> branch` and `Start new merge request` should
|
|
|
remain selected**
|
|
|
|
|
|
**14. Click once more the `commit` button**
|
|
|
|
|
|
* Prefix the Merge request title with `Draft:` to indicate the post is not yet
|
|
|
ready to be merged
|
|
|
|
|
|
* Within a few minutes, GitLab CI should build and upload the draft version
|
|
|
online
|
|
|
|
|
|
* Once the build is ready, a `View app` button should appear in the merge
|
|
|
request: clicking this link will open a browser tab to the preview URL
|
|
|
|
|
|
**15. Add more commits if any changes or adjustments are needed**
|
|
|
|
|
|
* New commits on the branch will automatically trigger a new preview build
|
|
|
|
|
|
**16. Once the blog post is finalized, retitle the Merge request to remove
|
|
|
`Draft:`**
|
|
|
|
|
|
* When the merge request is reviewed and accepted by a project maintainer,
|
|
|
a full project build will be triggered and deployed to
|
|
|
https://blog-staging.torproject.org
|
|
|
|
|
|
* Once the staging build passes QA, a deployment to production must be
|
|
|
triggered manually via the [Pipelines]() or Environments() project pages
|
|
|
|
|
|
[Pipelines]: https://gitlab.torproject.org/tpo/web/blog/-/pipelines
|
|
|
[Environments]: https://gitlab.torproject.org/tpo/web/blog/-/environments
|
|
|
|
|
|
10. In the text editor which appears, draft the new blog post (Markdown accepted in `summary` and `body` fields, see below for template)
|
|
|
11. Upload any images or attachments as needed in `assets/static/images/blog`: in the left column, navigate to that folder, then click the menu button that appears when hovering over the directory name and select `Upload file`
|
|
|
12. When finished drafting the new blog post, click the blue `Commit` button, lower left
|
|
|
13. Select `Commit to main branch` and unselect `Start new merge request`
|
|
|
14. Within a few minutes, the CI should build and upload the draft version at `https://username.pages.torproject.net/blog`
|
|
|
15. Add more commits if any changes or adjustments are needed
|
|
|
16. 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`)
|
|
|
17. When the merge request is reviewed and accepted, the changes are merged and the new blog post is published
|
|
|
|
|
|
### Sample contents.lr
|
|
|
|
... | ... | @@ -59,8 +110,6 @@ The new Tor Blog is here! |
|
|
The new Tor Blog now runs on top of the Lektor static site generator.
|
|
|
```
|
|
|
|
|
|
The optional field `image` can be specified in order to add a custom banner image. Example: `image: /static/images/blog/filename.png`. Note that the path starts with the forward slash and does not include `assets`. If this field is omitted, the default Tor logo is used.
|
|
|
|
|
|
# Discussion
|
|
|
|
|
|
## Drupal to Letor migration
|
... | ... | |