forked from leftypol/leftypol
Improve page titles and social media cards
This commit is contained in:
parent
9115f631ab
commit
795b54bf61
|
@ -15,7 +15,20 @@
|
|||
</script>
|
||||
|
||||
{% include 'header.html' %}
|
||||
<title>{{ board.url }} - {{ board.title|e }}</title>
|
||||
{% set page_num %}{% for page in pages %}{% if page.selected %}{% if page.num != 1 %}{{ page.num }}{% endif %}{% endif %}{% endfor %}{% endset %}
|
||||
{% set meta_subject %}{{ board.subtitle|newline_to_full_stop|e }}{% endset %}
|
||||
|
||||
<meta name="description" content="{{ meta_subject }}" />
|
||||
<meta name="twitter:card" value="summary">
|
||||
<meta name="twitter:title" content="{{ board.url }} - {{ board.title|e }}{% if page_num %} - Page {{ page_num }}{% endif %}" />
|
||||
<meta name="twitter:description" content="{{ meta_subject }}" />
|
||||
<meta name="twitter:image" content="{{ config.domain }}/{{ config.logo }}" />
|
||||
<meta property="og:title" content="{{ board.url }} - {{ board.title|e }}{% if page_num %} - Page {{ page_num }}{% endif %}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="{{ config.domain }}/{{ board.uri }}/{% if page_num %}{{ page_num }}.html{% endif %}" />
|
||||
<meta property="og:image" content="{{ config.domain }}/{{ config.logo }}" />
|
||||
<meta property="og:description" content="{{ meta_subject }}" />
|
||||
<title>{{ board.url }} - {{ board.title|e }}{% if page_num %} - Page {{ page_num }}{% endif %}</title>
|
||||
</head>
|
||||
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-{% if not no_post_form %}index{% else %}ukko{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
|
||||
<div class="bar top">
|
||||
|
|
|
@ -123,6 +123,15 @@
|
|||
</style>
|
||||
<title>{{ settings.title }}</title>
|
||||
<meta name="description" content="{{ metadescription|striptags }}">
|
||||
<meta name="twitter:card" value="summary">
|
||||
<meta name="twitter:title" content="{{ settings.title }}" />
|
||||
<meta name="twitter:description" content="{{ metadescription|striptags }}" />
|
||||
<meta name="twitter:image" content="{{ config.domain }}/{{ config.logo }}" />
|
||||
<meta property="og:title" content="{{ settings.title }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="{{ config.domain }}" />
|
||||
<meta property="og:image" content="{{ config.domain }}/{{ config.logo }}" />
|
||||
<meta property="og:description" content="{{ metadescription|striptags }}" />
|
||||
{{ metaextra }}
|
||||
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
<meta name="description" content="{{ board.url }} - {{ board.title|e }} - {{ meta_subject }}" />
|
||||
<meta name="twitter:card" value="summary">
|
||||
<meta name="twitter:title" content="{{ meta_subject }}" />
|
||||
<meta name="twitter:description" content="{{ thread.body_nomarkup|e }}" />
|
||||
{% if thread.files.0.thumb %}<meta name="twitter:image" content="{{ config.domain }}/{{ board.uri }}/{{ config.dir.thumb }}{{ thread.files.0.thumb }}" />{% endif %}
|
||||
<meta property="og:title" content="{{ meta_subject }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="{{ config.domain }}/{{ board.uri }}/{{ config.dir.res }}{{ thread.id }}.html" />
|
||||
|
|
Loading…
Reference in New Issue
Block a user