You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Download options can be configured per-network. Key changed from `downloaded_content` to `download_content` and moved to each network section.
- Better explanations regarding Firefox privacy shield and Instagram changing URLs: its for well known social networks only (and others, but not in our context).
Copy file name to clipboardExpand all lines: README.md
+33-14Lines changed: 33 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,34 +54,51 @@ built_in_js: true
54
54
# the default embeds to work, check this.
55
55
include_font_awesome_5: true
56
56
57
+
58
+
# Options for all networks
59
+
#
60
+
# -- theme --
61
+
# The embed theme: with the default CSS, matches the light & dark
62
+
# themes for the related network, except for Instagram (which does not
63
+
# have a dark theme), where the dark theme colours are inspired by Twitter.
64
+
#
65
+
# -- downloaded_content --
57
66
# The plugin can download images, videos, and GIFs, to ensure a
58
67
# complete independence from the social networks, at the cost of
59
-
# some disk space.
60
-
downloaded_content:
61
-
images: true
62
-
videos: true
63
-
64
-
# Options for Twitter: embed theme (with the default CSS, matches the
65
-
# light & dark Twitter themes) and API credentials required to load
66
-
# tweets (an explanation on how to create an application is available
67
-
# below).
68
+
# some disk space. This includes avatars and custom emojis (if any).
69
+
70
+
68
71
twitter:
69
72
theme: light
73
+
74
+
# Please not that if false, Firefox will block Twitter images from loading by default (for privacy reasons).
75
+
download_content:
76
+
images: true
77
+
videos: true
78
+
79
+
# API credentials required to load tweets (an explanation on how to create an application is available below).
70
80
consumer_key: null
71
81
consumer_secret: null
72
82
access_token: null
73
83
access_token_secret: null
74
84
75
-
# Options for Mastodon: embed theme (with the default CSS, matches the
76
-
# light & dark Mastodon themes).
85
+
77
86
mastodon:
78
87
theme: light
79
88
80
-
# Options for Instagram: embed theme (with the default CSS, the light theme
81
-
# matches Instagram, and the dark one was created from the light one and
82
-
# some inspiration from Twitter own dark theme).
89
+
download_content:
90
+
images: true
91
+
videos: true
92
+
93
+
83
94
instagram:
84
95
theme: light
96
+
97
+
# Please not that if false, Firefox will block Instagram images from loading by default (for privacy reasons).
98
+
# Please also note that as Instagram's images CDN URLs may expire, you should keep that to true if possible.
99
+
download_content:
100
+
images: true
101
+
videos: true
85
102
```
86
103
87
104
Themes can be `light` or `dark` as for now and for the built-in CSS. If you want to add your own, themes only add a CSS class to the embeds containers: `sse-theme-[thetheme]` (e.g. `sse-theme-light` or `sse-theme-dark`); you can put anything there and reference it on your CSS file.
@@ -94,6 +111,8 @@ To use Twitter embeds, you'll need to register an application. This is done in a
94
111
2. Then, click the **Keys and access tokens** tab and at the bottom of the page, click **Create my Access Token**.
95
112
3. Finally, copy the credentials in the configuration file (or in the admin).
96
113
114
+
If not configured, you'll see an error if you try to embed a tweet, but other embeds will work fine.
115
+
97
116
### Customization
98
117
99
118
If you want to customize the embeds' HTML code, you can override the `partials/static-social-embeds` templates. The template name is the same as the shortcode name (see below), e.g. `toot.html.twig` for Mastodon embeds template. Templates context vary for different social networks; checkout built-in templates or shortcode classes to know which variables you can use.
0 commit comments