making twitter cards optional, but on by default
This commit is contained in:
parent
6496bae0a3
commit
d39edd0a30
3 changed files with 11 additions and 2 deletions
|
@ -108,6 +108,15 @@ In dark mode
|
|||
|
||||
![image in dark mode](./iimg_dark.png)
|
||||
|
||||
### Disable Twitter card
|
||||
|
||||
Twitter metatags are generated by default, to disable them set `extra.twitter_card` to `false` in in your `config.toml`
|
||||
|
||||
```toml
|
||||
[extra]
|
||||
twitter_card = true
|
||||
```
|
||||
|
||||
## TODO
|
||||
|
||||
- [ ] Add RTL support
|
||||
|
|
|
@ -17,7 +17,6 @@ highlight_code = true
|
|||
[extra]
|
||||
author = "Ahmed Alaa"
|
||||
logo = "images/logo.png"
|
||||
twitter = true
|
||||
header_nav = [
|
||||
{ name = "~home", url = "/" },
|
||||
{ name = "#tags", url = "/tags" },
|
||||
|
|
|
@ -60,7 +60,8 @@
|
|||
{% if description %}<meta property="og:description" content="{{ description }}">{% endif %}
|
||||
{% if image %}<meta property="og:image" content="{{ image }}">{% endif %}
|
||||
|
||||
{% if config.extra.twitter %}
|
||||
{% set twitter_card = config.extra.twitter_card | default(value=true) %}
|
||||
{% if twitter_card != false %}
|
||||
<meta property="twitter:card" content="summary_large_image">
|
||||
<meta property="twitter:url" content="{{ url | safe }}">
|
||||
{% if title %}<meta property="twitter:title" content="{{ title }}">{% endif %}
|
||||
|
|
Loading…
Reference in a new issue