Improved SEO (meta tags support)
I maintainer di solito rispondono entro 2 giorni
@anikethsaha ci sta già lavorando.
Dal 23/6/2020.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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!
- Lingua principale
- JavaScript
- Stelle
- 31.5k
- Fork
- 5.8k
- Merge medio
- 2g 14h
- PR unite (30g)
- 5
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di docsifyjs/docsify
-
Query parameter values are truncated at a second equals signForse già presa @xu91102 l’ha presa 21 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
-
Bullet points beginning with inline math: subsequent text formatting not recognised correctlyApertabug Triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
Cached AJAX responses lose status metadata exposed through vm.route.responseForse già presa @xu91102 l’ha presa 21 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
In the Edge browser, the character `{docsify-updated}` is not replacedForse di nuovo libera @AmanUllah687 l’ha presa 74 giorni fa e non c’è nessuna pull request aperta. Apertawait for information
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
docsifyjs/docsify#2681 · 11 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Nested/Recursive includesApertafeature request Triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
docsifyjs/docsify#2643 · 5 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di docsifyjs/docsify
Issue simili
-
effort:low model:light plan planner:fable-5-1 test-quality tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
area: agent area: theme help wanted lane: free-agent roadmap size: S status: needs-brief type: layout type: task
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
arminazimi/slipway#64 ·
-
release:v5.34
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
Jason-Vaughan/TangleClaw#2469 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
hacktoberfest help wanted skip-changelog
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
wassim-azi/agy-powerline#74 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
MadeBaruna/paimon-moe#696 ·