Improved SEO (meta tags support)
メンテナーはふだん 2 日以内に返信
@anikethsaha がすでに取り組んでいます。
2020年6月23日 から。
評価
この issue はまだ評価されていません。
説明
Feature request
What problem does this feature solve?
It improves SEO of pages generated by Docsify. It makes it easier for search engines to find the relevant content, and when a user shares a link to a Docsify page, the rendered preview is more accurate (title, description and image).
Example (diff pages, same SEO 😢 ):
What does the proposed API look like?
Marp allows you to write slides using Markdown, and each file has a small header like this:
---
marp: true
title: Marp CLI example
description: Hosting Marp slide deck on the web
theme: uncover
paginate: true
---
Docsify could have something similar that would allow us to define the meta tags of each page. Example:
---
<!-- Primary Meta Tags -->
meta-title: Site title: Page title
meta-description: This is the summary that appears on search engine results or preview links
<!-- Open Graph -->
meta-og-type:
meta-og-url:
meta-og-title:
meta-og-description:
meta-og-image: https://yourdomain.com/path/to/image.jpg
<!-- Twitter -->
meta-twitter-card:
meta-twitter-url:
meta-twitter-title:
meta-twitter-description:
meta-twitter-image: https://yourdomain.com/path/to/image.jpg
---
# Page title
And the _rest_ of the page.
- I think a syntax like this would be good enough for us. I would say the first two fields are the MVP, as that works everywhere.
- Then Open Graph would be helpful, because it allows you to define an image.
- And finally, with the lowest priority/importance, the Twitter meta tags, because if Twitter can't find them it will fallback to the Open Graph tags.
How should this be implemented in your opinion?
I checked if it was possible to hack it with the current Docsify version by hardcoding HTML tags in the .md file.
<!-- markdownlint-disable MD033 -->
<!-- SEO tags -->
<title>(TITLE) (SEPARATOR) Title of this page</title>
<meta name="title" content="(TITLE) (SEPARATOR) Title of this page">
<meta name="description" content="A description that is specific to this page.">
# TITLE_HERE

It didn't work. Those tags were added inside <body> ... <article>, but we need them to exist in the <head> section.
I propose this flow:
- When Docsify reads a Markdown file, it checks if it has a header.
- If it doesn't, then everything works as is.
- If it has, it will read each key (e.g.
meta-title) and override it's value.
Example:
Docsify detects a header. One key is
meta-dummy. Docsify doesn't know how to handle this key, so it skips it. The next key ismeta-title. Docsify knows how to handle this, so it goes tohead.meta.titleand replaces the default value with the value in the file header.
Are you willing to work on this yourself?
I don't think I have enough JS and Docsify knowledge to develop this feature. But I can (beta) test it!
- 主要言語
- JavaScript
- スター
- 31.5k
- フォーク
- 5.8k
- 平均マージ
- 2日 14時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docsifyjs/docsify のほかの issue
-
Query parameter values are truncated at a second equals sign対応中かも @xu91102 が 22 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
bug Triage
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信
-
Cached AJAX responses lose status metadata exposed through vm.route.response対応中かも @xu91102 が 22 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
In the Edge browser, the character `{docsify-updated}` is not replaced再び着手できるかも @AmanUllah687 が 76 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンwait for information
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
docsifyjs/docsify#2681 · コメント 11 件 ·
メンテナーはふだん 2 日以内に返信
-
feature request Triage
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
docsifyjs/docsify#2643 · コメント 5 件 ·
メンテナーはふだん 2 日以内に返信
docsifyjs/docsify の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 2 日以内に返信
-
feedback simulation workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
githubnext/gh-aw-workshop#4755 ·
メンテナーはふだん 1 日以内に返信
-
fix
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
idean3885/claude-ops-agent#728 ·
メンテナーはふだん 1 日以内に返信
-
deck: add to staging level: easy p-feature: Privacy Policy priority: MUST HAVE ready for product role: front-end size: 0.25pt Waiting on Stakeholder
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
hackforla/tdm-calculator#3654 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add: Sony Vizha HDオープンcheck:failed feeds:add
難易度 1/5 1時間未満 初心者へのやさしさ 78/100