Skip to content

Commit

Permalink
Documents the Mastodon shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
sellorm committed Dec 18, 2022
1 parent a193155 commit 48408bf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
7 changes: 4 additions & 3 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ website:
menu:
- examples/gists.qmd
- examples/loom.qmd
- examples/mastodon.qmd
- examples/twitter.qmd
- examples/vimeo.qmd
- examples/youtube.qmd
right:
- icon: twitter
href: https://twitter.com/sellorm
aria-label: sellorm Twitter
- icon: mastodon
href: https://mastodon.social/@sellorm
aria-label: sellorm Mastodon
- icon: github
href: https://github.com/sellorm/quarto-social-embeds
aria-label: GitHub
Expand Down
12 changes: 1 addition & 11 deletions example.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Gists can be pretty handy.

{{< include examples/loom.qmd >}}

{{< include examples/mastodon.qmd >}}


## Twitter
Expand Down Expand Up @@ -60,14 +61,3 @@ Uses the shortcode:
{{< youtube zk9zHqXm6m0 >}}

The video is about my [R4Pi](https://r4pi.org) project.

## Mastodon

This is a post on mastodon

Uses this shortcode:
```{.markdown shortcodes="false"}
{{< mastodon https://mastodon.social/@sellorm/109376707453406631 >}}
```

{{< mastodon https://mastodon.social/@sellorm/109376707453406631 >}}
21 changes: 21 additions & 0 deletions examples/mastodon.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Mastodon

This is a post on mastodon

Uses this shortcode:
```{.markdown shortcodes="false"}
{{< mastodon "https://mastodon.social/@sellorm/109376707453406631" >}}
```

:::{.callout-note}
You _must_ enclose the Mastodon URL in quotes, or the post will not be displayed.
:::

{{< mastodon "https://mastodon.social/@sellorm/109376707453406631" >}}


You can obtain the username and status id of a tweet by clicking the "share tweet" button and choosing "copy URL".

This will give you a URL like this one: `https://twitter.com/juliesquid/status/1557485909486059523`.
The "user" is the section between `twitter.com/` and `/status`.
The status "id" is everything between `status/` and the end of the URL or `?`, whichever comes first.
1 change: 1 addition & 0 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Currently includes shortcodes for the following:

* [GitHub gists](examples/gists.qmd)
* [Loom](examples/loom.qmd)
* [Mastodon](examples/mastodon.qmd)
* [Twitter](examples/twitter.qmd)
* [Vimeo](examples/vimeo.qmd)
* [Youtube](examples/youtube.qmd)
Expand Down

0 comments on commit 48408bf

Please sign in to comment.