あなたにSEOを加えてください


すべてのページでフロント問題を追加


---
title: "Page Title"
metatitle: "Page Meta Title"
metadescription: "Page Meta Description"
image: Image Address
---

データのURLを追加

site.json_dataファイルを作る
{
"url": "https://yoursiteurl.com"
}

プライマリタグ


あなたのbase.njkまたはnjkを加えたあなたのメイン<head>にこれらを加えてください
<title>{{ title }}</title>
<meta name="title" content="{{ metatitle }}">
<meta name="description" content="{{ metadescription }}">

オープングラフ


<meta property="og:type" content="website">
<meta property="og:url" content="https://example.com{{page.url}}">
<meta property="og:title" content="{{ metatitle }}">
<meta property="og:description" content="{{ metadescription }}">
<meta property="og:image" content="{{ site.url + image }}">
自動的にオープングラフ画像を生成する場合は、このpost を読むことができます.

Twitter


<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://example.com{{page.url}}">
<meta property="twitter:title" content="{{ metatitle }}">
<meta property="twitter:description" content="{{ metadescription }}">
<meta property="twitter:image" content="{{ site.url + image }}">

サイトマップ


あなたのルートディレクトリにsitemap.njkを作ってください.自動的にsitemap.xml.になります
---
permalink: /sitemap.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    {% for page in collections.all %}
        <url>
            <loc>{{ site.url }}{{ page.url | url }}</loc>
            <lastmod>{{ page.date.toISOString() }}</lastmod>
        </url>
    {% endfor %}
</urlset>

ロボット


を作成する
Sitemap: https://www.yoursitename.com/sitemap.xml
User-agent: *
Disallow: