... | ... | @@ -107,6 +107,16 @@ title: Blog |
|
|
[Pipelines]: https://gitlab.torproject.org/tpo/web/blog/-/pipelines
|
|
|
[Environments]: https://gitlab.torproject.org/tpo/web/blog/-/environments
|
|
|
|
|
|
### Comment topic
|
|
|
|
|
|
#### 16. When the blog post is published, visit the page with a javascript-enabled browser
|
|
|
|
|
|
* This will trigger the Discourse forum to create a new topic with the contents
|
|
|
of the new blog post
|
|
|
|
|
|
* Adjustments to the topic source HTML could be needed to allow the forum to
|
|
|
display images correctly (known Discourse bug being worked on)
|
|
|
|
|
|
# Reference
|
|
|
|
|
|
## Sample contents.lr
|
... | ... | @@ -169,6 +179,27 @@ 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
|
|
|
percentage.
|
|
|
|
|
|
## Comments embedding
|
|
|
|
|
|
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
|
|
|
contents of the new post. In turn, replies to the forum topic will appear
|
|
|
embedded below the blog post.
|
|
|
|
|
|
The configuration for this feature on the Discourse side is located in the Admin
|
|
|
section under **Customize** -> [Embedding][]
|
|
|
|
|
|
The key configuration here is **CSS selector for elements that are allowed in
|
|
|
embeds**. Without the appropriate CSS selectors listed here, some parts of the
|
|
|
blog post may not be imported correctly. There is no documentation of how this
|
|
|
parameter works, but through trial and error we figured out that selectors must
|
|
|
one or two levels "close" to the actual HTML elements that we need to appear in
|
|
|
the topic. In other words, specifying `main article.blog-post` as a selector and
|
|
|
hoping that all sub-elements will be imported in the topic doesn't work: the
|
|
|
sub-elements themselves must be targetted explicitely.
|
|
|
|
|
|
[Embedding]:https://forum.torproject.net/admin/customize/embedding
|
|
|
|
|
|
# Discussion
|
|
|
|
|
|
## Drupal to Lektor migration
|
... | ... | |