Почему открытые теги графа <meta>не работают на шаблоне тимелина - PullRequest
0 голосов
/ 03 мая 2019

Я добавил метатеги с открытым графиком на свою страницу с тимьяном. Когда я пытаюсь поделиться своей страницей - это выглядит как отсутствие тегов.

Код моей страницы (частично)

<!DOCTYPE html>
<html lang="ru" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      prefix="og: //ogp.me/ns#">
    <head>
        <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <link th:href="@{/css/app.css}" rel="stylesheet"/>
        <title th:text="${'pageTitle'}">Title</title>

        <meta property="og:type"  content="article" />
        <meta property="og:url"   th:content="${'https://my_site_url'}" />
        <meta property="og:title" th:content="${'pageTitle'}" />
        <meta property="og:description"   th:content="${'DESCRIPTION'}" />
        <meta property="og:image"         th:content="@{'https://pp.vk.me/c629531/v629531034/3172e/xEBYyER1WE4.jpg'}" />
    </head>

    <body>
        <section class="base fullpage">
            <div class="fullpage__content">
                <div th:replace="component/partial/header"/>
                <div th:replace="${page}"/>
            </div>
            <div class="fullpage__bottom">
                <div th:replace="component/partial/footer"/>
            </div>
        </section>
        <div th:replace="component/auth/auth"/>
    </body>
</html>

И кнопка моей страницы общего доступа

<a th:href="@{'https://twitter.com/share?url=' + ${full_my_Page_Url}}" rel="canonical" target="_blank" class="c-article-socials__link twitter-share-button">
  <div class="icon">
     <img th:src="@{/img/icons/social/tw-h.svg}" alt="">
  </div>
</a>

Я ожидал поделиться картой предварительного просмотра, если она заполнена открытыми тегами графика, но теперь она пуста, я могу поделиться, но не имею информации. Только ссылка из кнопки «Поделиться», но нет информации из префикса og info

ОБНОВЛЕНИЕ Мой сгенерированный HTML-код заголовка выглядит так:

<head>
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <link href="/css/app.css" rel="stylesheet">
 <title>Статья</title>

 <meta property="og:type" content="website">
 <meta property="og:url"content="https://localhost:8443/articles/instruction/2">
 <meta property="og:title" content="Статья">
 <meta property="og:description" content="DESCRIPTION">
 <meta property="og:image" content="/cmsstatic/img/posts/image_5.png">
</head>
...