Improved SEO (meta tags support)
Maintainer thường phản hồi trong vòng 2 ngày
@anikethsaha đang làm issue này rồi.
Từ ngày 23/6/2020.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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!
- Ngôn ngữ chính
- JavaScript
- Star
- 31.5k
- Fork
- 5.8k
- Merge trung bình
- 2 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docsifyjs/docsify
-
Query parameter values are truncated at a second equals signCó thể đã có người làm @xu91102 đã nhận 21 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Bullet points beginning with inline math: subsequent text formatting not recognised correctlyĐang mởbug Triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Cached AJAX responses lose status metadata exposed through vm.route.responseCó thể đã có người làm @xu91102 đã nhận 21 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
In the Edge browser, the character `{docsify-updated}` is not replacedCó thể làm lại được @AmanUllah687 đã nhận 74 ngày trước và không có pull request nào đang mở. Đang mởwait for information
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
docsifyjs/docsify#2681 · 11 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Nested/Recursive includesĐang mởfeature request Triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
docsifyjs/docsify#2643 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của docsifyjs/docsify
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
keyxmakerx/Chronicle#1532 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement feature good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug lsp sev-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Miaotofu01/Study-Mate#206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
Uuriko/project-room#3998 ·
Maintainer thường phản hồi trong vòng 1 ngày