Hướng dẫn về Hexo SEO
Cách làm SEO on một Hexo site — đó Node.js static site generator. Hexo outputs pure HTML so nội dung là crawlable on đó đầu tiên fetch, nhưng sitemaps, robots.txt, meta các mô tả, canonicals, dữ liệu có cấu trúc, và ổn định permalinks all phụ thuộc on plugin và config.
Ngôn ngữ
Hexo là một Node.js static site generator: hexo generate compiles Markdown vào pure static HTML, so Googlebot đọc của bạn toàn bộ nội dung on đó đầu tiên fetch với không JavaScript kết xuất queue. đó là đó crawlability floor — nhưng đây là không finished SEO. Hầu hết default themes ship không sitemap, không robots.txt, không theo-post mô tả meta, không canonical, và không dữ liệu có cấu trúc; bạn thêm những với _config.yml settings, front quan trọng các trường, theme edits, và plugin (hexo-generator-sitemap, hexo-generator-robotstxt, hexo-generator-feed, hexo-abbrlink). Đó big traps là một sai url: trong _config.yml, đó date-based default permalink đó breaks links on rename, và auto-generated category/tag archives đó tạo thin duplicate nội dung. Cho Baidu-facing các trang, đó static output xóa một real crawling obstacle — though đó là không phải là bảo đảm of Baidu lập chỉ mục hoặc xếp hạng.
Tóm tắt — Hexo xây dựng của bạn blog vào đơn giản HTML files ahead của time, so Google sees của bạn nội dung moment nó fetches trang — không đang chờ on JavaScript. đó easy part. catch: Hexo không thêm sitemap,
robots.txt, meta các mô tả, hoặc canonical tags on của nó own. bạn turn những điều đó on với một vài plugin và config settings.
Điều gì Hexo là
Hexo là free blogging framework được xây dựng on Node.js. bạn ghi posts trong Markdown,
chạy hexo generate, và Hexo turns mọi thứ vào finished HTML files. bạn upload
những điều đó files để host (GitHub các trang, Netlify, Cloudflare các trang, và so on). Khi
Google hoặc reader các yêu cầu trang, họ nhận hoàn tất HTML right away — có
không có gì left cho trình duyệt để xây dựng. Evidence for this claim Hexo generates static site files from source content. Scope: Hexo static generation. Confidence: high · Verified: Hexo documentation
đó great Đối với SEO: của bạn text và links là trong trang từ đầu tiên byte, so Google không có để chạy bất kỳ JavaScript để tìm của bạn nội dung. Hexo sits trong giống nhau family as Hugo và Jekyll — tất cả them pre-xây dựng mọi thứ (see Static trang web Generators).
Điều gì Hexo làm không làm cho bạn
Ở đây nơi beginners nhận caught: fresh Hexo trang web với default theme là bị thiếu phần lớn basic SEO pieces. bạn thường có để thêm:
- ** XML sitemap** — install
hexo-generator-sitemapplugin. Evidence for this claim The official Hexo sitemap generator creates sitemap.xml output. Scope: hexo-generator-sitemap plugin. Confidence: high · Verified: Hexo sitemap generator - **
robots.txt** — installhexo-generator-robotstxt(hoặc drop file trong của bạn nguồn folder). - Meta các mô tả — thêm
description:để mỗi post, và phần lớn themes cần nhỏ template edit để thực ra print nó. - Canonical tags — theme-phụ thuộc; popular tiếp theo theme có thể làm nó sau khi bạn đặt điều lên.
hai settings đó quan trọng phần lớn trước khi bạn launch
Trong của bạn _config.yml file:
url:phải là đặt để của bạn thực trực tiếp address vớihttps://(ví dụhttps://yourdomain.com). Nhận điều này sai và của bạn sitemap, canonical, và feed links all point để sai place.permalink:controls của bạn URL pattern. default diễn đạt date trong mỗi URL. nhiều mọi người ưu tiên cleaner:title/. Whatever bạn pick, không thay đổi post URL sau đó không có chuyển hướng — nó breaks links và loses các tín hiệu xếp hạng.
điều phần lớn mọi người nhận sai
“It’s static HTML, so SEO is automatic.” (bản dịch) «đây là static HTML, so SEO là tự động.» Không. Static HTML có nghĩa là Google có thể crawl nội dung của bạn easily — đó là một head bắt đầu, không một finish line. Bạn vẫn cần đó sitemap, đó meta các mô tả, đó canonical tags, và good nội dung. Đó static part chỉ có nghĩa là bạn sẽ không có đó JavaScript lập chỉ mục các vấn đề đó single-trang apps có.
Muốn đầy đủ version — mỗi plugin, tiếp theo theme các cách sửa, category/tag duplicate-nội dung trap, dữ liệu có cấu trúc, và Baidu targeting? Switch để Nâng cao tab.
Tóm tắt — Hexo (
hexo generate) emits pure static HTML, so của bạn nội dung là trong đầu tiên byte của phản hồi — không Web Kết xuất Service, không Wave 2 delay. đó crawlability floor, không finished SEO. Default themes ship không sitemap, không robots.txt, không theo-post mô tả meta, không canonical, và không dữ liệu có cấu trúc; bạn thêm them qua_config.yml, front quan trọng, theme template edits, và plugin (hexo-generator-sitemap,hexo-generator-robotstxt,hexo-generator-feed,hexo-abbrlink,hexo-indexnow). three traps đó thực ra bite: saiurl:trong_config.ymlbreaks canonicals/sitemap/feed; date-based default permalink ties các URL để filenames so rename breaks links; và auto-generated category/tag archives tạo thin duplicate nội dung. cho Baidu-facing các trang static output là thực advantage.
Hexo static output là crawling advantage
hexo generate chạy của bạn Markdown và theme templates qua xây dựng step và ghi
folder của finished HTML, CSS, và assets. SEO-relevant fact là Khi HTML
tồn tại: tại xây dựng time, sau khi, cho mọi người — không theo yêu cầu, và không trong trình duyệt. Evidence for this claim The Hexo generate command builds static files into the configured public directory. Scope: Hexo generate command. Confidence: high · Verified: Hexo: Commands
Google mô tả một hai-phase xử lý cho JavaScript các trang: Wave 1 fetches đó thô HTML và indexes static nội dung immediately; Wave 2 là một deferred headless-Chromium kết xuất queue đó có thể take seconds để days. Hexo output skips Wave 2 hoàn toàn — mỗi trang là thô HTML on đó đầu tiên fetch. Google own hướng dẫn là blunt đó này là đó được khuyến nghị path: dynamic kết xuất đã là “a workaround and not a long-term solution… use server-side rendering, static rendering, or hydration as a solution,” (bản dịch) «một workaround và không một dài-term giải pháp… dùng máy chủ-side kết xuất, static kết xuất, hoặc hydration as một giải pháp,» và Hexo produces static kết xuất, một of đó three explicitly được khuyến nghị approaches.
Hai nhiều hơn wins fall out của điều này:
- Crawlable links theo mặc định. Hexo templates emit đơn giản
<a href>anchors trong static HTML, so they satisfy Google requirement đó links là real, crawlable URLs — không JavaScript-generated navigation để design khoảng. - Cheap để crawl. Static files phân phối từ một CDN có effectively zero máy chủ-processing cost theo yêu cầu, so Googlebot có thể crawl tại của nó được phép rate không có tripping crawl-rate throttling. As Gary Illyes put điều này, “if you are making expensive database calls, that’s going to cost the server a lot” (bản dịch) «nếu bạn là đang làm expensive database calls, đó là going để cost đó máy chủ một lot» — Hexo làm none.
caveat: zero render-blocking cho các crawler không phải giống nhau as zero render-blocking cho người dùng. Theme JS/CSS vẫn ảnh hưởng Core Web Vitals (nhiều hơn dưới).
Configure _config.yml đầu tiên — url: là big một
đặt những điều này global keys trước khi của bạn đầu tiên deploy:
url: https://yourdomain.com # must match your live domain, with https://
permalink: :title/ # or :year/:month/:day/:title/ (the default)
title: Site Title
description: Global meta description fallback
author: Your Name
language: en
meta_generator: false # removes the <meta name="generator" content="Hexo"> tagurl:là single phần lớn consequential setting. nó trang web configured base URL, mà themes và generators có thể sử dụng cho canonical tags, feeds, sitemaps, và pagination. sai giá trị có thể propagate vào những điều đó outputs. Evidence for this claim Hexo's url configuration supplies the website URL used by themes and generators. Scope: Exact downstream fields depend on the installed theme and plugins. Confidence: high · Verified: Hexo: Configurationpermalink:— default:year/:month/:day/:title/produces date-based các URL đó look stale theo thời gian và tie slug để filename. Cleaner options là/:title/hoặc/:category/:title/.meta_generator: falsestrips Hexo generator fingerprint từ<head>.- Deploying để subdirectory?
url:alone không phải đủ — đặtroot:để subdirectory path cũng (e.g.root: /blog/). Hexourl_forhelper xây dựng root-relative links, trong khifull_url_forprepends đầy đủurl:giá trị; nhậnroot:sai on subdirectory deploy và liên kết nội bộ, feeds, và sitemap entries end lên pointing tại domain root thay vì thực tế path. - Config precedence: trang web
_config.ymlsets baseurl/root/permalinkcác giá trị; theme own config (của nó bundled_config.yml, hoặc_config.<theme>.ymltại project root) layers on top cho display và template settings, nhưng không override trang web-cấp độ URL structure — theme có thể’t khắc phục saiurl:. - Kiểm thử trong safe chế độ?
hexo server --safe(hoặchexo --safe) disables mỗi plugin và script, so output bạn’re viewing là bị thiếu của bạn sitemap, robots.txt, và bất kỳ SEO plugin tags. không sử dụng safe-chế độ preview để kiểm tra SEO output — chạy thông thườnghexo generateđầu tiên.
Front quan trọng SEO controls (và Điều gì bị thiếu)
Native Hexo front quan trọng Bạn có thể rely on:
---
title: "Article Title for the <title> tag"
date: 2024-01-15
updated: 2024-06-01
tags: [tag1, tag2]
categories: [Category]
permalink: /custom-url/ # overrides the global pattern for this post
published: true
sitemap: false # exclude this post from sitemap.xml
---Điều gì là không trong native front quan trọng và cần theme hỗ trợ hoặc template edit:
description( mô tả meta) — phần lớn themes không print nó không có patch.keywords(theo-post từ khóa meta) — và largely pointless anyway; Google có đã bỏ qua<meta name="keywords">since 2009. Treatkeywordsas organizational aid, không xếp hạng lever.canonical(override canonical URL) — theme-phụ thuộc.
giữ updated: trường hiện tại Khi bạn revise post — sitemap freshness phụ thuộc
on nó (tiếp theo section).
Essential plugin
Sitemap — hexo-generator-sitemap (chính thức):
npm install hexo-generator-sitemap --savesitemap:
path:
- sitemap.xml
tags: true
categories: trueĐiều này đọc lastmod từ mỗi post updated trường (falling back để date) — mà
matters vì Bing warns đó lastmod “should reflect the true last modification
time of the page content, not the sitemap file itself.” (bản dịch) «nên reflect đó đúng cuối cùng modification time of đó trang nội dung, không đó sitemap file itself.» Sau hexo generate, submit
đó resulting sitemap.xml trong Google Search Console và Bing Quản trị viên web Tools. Và
heed Bing other warning: “Do not submit a static sitemap and forget it. New pages
won’t get picked up” (bản dịch) «Không submit một static sitemap và forget điều này. New các trang sẽ không nhận picked lên» — cho Hexo đó có nghĩa là re-deploying và re-submitting (hoặc dùng
IndexNow) sau mỗi new post.
robots.txt — hexo-generator-robotstxt:
npm install hexo-generator-robotstxt --saverobotstxt:
useragent: "*"
allow:
- /
disallow:
- /private/
sitemap: https://yourdomain.com/sitemap.xmlkhông có nó, Hexo produces không robots.txt tại all — không sitemap pointer cho các crawler.
RSS — hexo-generator-feed: relevant cho aggregators và Google News eligibility;
John Mueller bao gồm RSS feed on his own static trang web.
IndexNow — hexo-indexnow: Bing khuyến nghị pairing sitemaps với IndexNow cho
thực-time, URL-cấp độ submission. Drop generated mấu chốt file vào source/ so nó
deploys as yourdomain.com/<key>.txt. Note Đây là cho Bing, Yandex, và others —
không Google, mà không sử dụng IndexNow cho chung các trang.
Permalink stability — abbrlink khắc phục
default permalink có hai SEO các vấn đề: renaming Markdown file thay đổi URL
(vì slug xuất hiện từ filename), và non-Latin các tiêu đề (Chinese, emoji)
produce garbled các URL. hexo-abbrlink decouples URL từ filename by writing
ổn định hash back vào front quan trọng:
npm install hexo-abbrlink --savepermalink: posts/:abbrlink/
abbrlink:
alg: crc32 # crc16 or crc32
rep: hex # dec or hexbạn nhận điều gì đó như /posts/3a9c2b1d/ đó survives file renames, category
thay đổi, và date edits. underlying rule stands either way: sau khi URL là
published, không thay đổi nó không có 301 chuyển hướng — rename không có một destroys
giá trị liên kết và bất kỳ accumulated các tín hiệu xếp hạng.
Hai nhiều hơn permalink pitfalls worth knowing trước khi bạn pick pattern:
- không sử dụng
:idtoken. Hexo documents post IDs as không persistent trên database bộ nhớ đệm reset — nếu của bạn permalink pattern bao gồm:id, bộ nhớ đệm rebuild có thể silently thay đổi mỗi post URL. Stick để:title,:abbrlink, hoặc một ổn định token. trailing_indexvàtrailing_htmllà tách biệt controls, không một setting. Hexopretty_urlsconfig toggles them independently — một governs liệu trailingindex.htmllà stripped từ generated links, khác liệu trailing slash là đã thêm. nếu những điều này không match Cách của bạn host thực ra resolves các URL (some hosts chuyển hướng/postđể/post/, others không), Bạn có thể end lên với internal links, canonicals, và sitemap entries disagreeing với URL máy chủ thực ra phục vụ.
tiếp theo theme SEO configuration
tiếp theo là phần lớn-được sử dụng Hexo theme, configured trong _config.next.yml:
canonical: true # builds canonical from url: + page path
webmaster_tools:
google: VERIFICATION_STRING
bing: VERIFICATION_STRING
baidu: VERIFICATION_STRING
open_graph:
enable: true
twitter_card: summary_large_image** tiếp theo meta-mô tả khoảng trống:** tiếp theo không tự động inject theo-post
<meta name="description"> từ front quan trọng description:. bạn patch theme
head template để fall back từ page.description để trang web mô tả. Đây là
single phần lớn phổ biến tiếp theo SEO miss. (tiếp theo làm hỗ trợ canonical: true và được xây dựng-trong
Open Graph / Twitter Cards, so những điều đó ít nhất hoạt động sau khi enabled.)
cho non-tiếp theo themes, bạn thường tạo hoặc edit head một phần để emit og:title,
og:description, og:image, og:url, và twitter:card — hỗ trợ varies widely by
theme.
Ai owns mỗi tag Khi theme và plugin cả hai emit nó. theme được xây dựng-trong
Open Graph/canonical hỗ trợ và all-trong-một plugin như hexo-seo (mà
generates của nó own breadcrumb, trang web, và bài viết schema) có thể cả hai try để ghi
giống nhau tag. Chuyển thành cả hai on produces duplicate hoặc conflicting <meta> tags, canonicals,
hoặc JSON-LD chặn trong giống nhau <head>. Pick một layer as owner cho mỗi tag
category — theme hoặc plugin, không cả hai — và disable corresponding feature on
khác trước khi bạn ship.
Category và tag các trang: duplicate-nội dung trap
Hexo auto-generates archive trang cho mỗi category và mỗi tag, mỗi filled với post excerpts đó cũng xuất hiện on posts themselves. Tại quy mô đó hundreds của thin các trang competing cho giống nhau các truy vấn và diluting crawl attention. của bạn options:
sitemap: falsetheo archive (impractical tại quy mô).- Theme-cấp độ
noindexon category/tag archive templates. - giữ them được lập chỉ mục chỉ nếu category là genuine, curated topic hub với thực giá trị.
- Self-referencing canonical on mỗi paginated archive trang (trang 2 canonicalizes để itself, không trang 1).
Một caveat on option 2: dài-term noindex eventually làm Google dừng sau
links on đó trang, so noindexing tag các trang có thể reduce crawling của posts đó là chỉ
linked từ những điều đó tags. hãy đảm bảo such posts là reachable some khác way.
của bạn route inventory là bigger hơn source/. Category, tag, archive, và
pagination các trang không come từ Markdown files — Hexo generator API là Điều gì
thực ra tạo them, và themes hoặc plugin có thể register của họ own generators cũng.
đó có nghĩ là crawlable URL surface có thể silently expand beyond Điều gì bạn’d expect
từ browsing của bạn source/ folder. sau khi installing hoặc updating theme hoặc plugin,
chạy hexo generate và diff route list trong public/ thay vì assuming bạn
know mỗi URL Hexo là producing.
Dữ liệu có cấu trúc / JSON-LD
Hexo injects không dữ liệu có cấu trúc theo mặc định. Either thêm BlogPosting JSON-LD block để
của bạn theme post template (headline, datePublished, dateModified, author,
publisher, url) hoặc sử dụng all-trong-một plugin như hexo-seo đó generates
breadcrumb, trang web, và bài viết schema cho bạn.
Core Web Vitals
Static output là fast, nhưng themes có thể undo đó. tiếp theo và nhiều themes bundle lớn
JS/CSS và icon-font libraries (Font Awesome là frequent LCP/render-blocking
culprit). Audit với Lighthouse, sau đó reach cho hexo-all-minifier (HTML/CSS/JS
compression tại xây dựng time), hexo-lazyload-image, và defer/async on thứ ba-party
scripts như phân tích và quảng cáo.
Targeting Baidu (Chinese-audience các trang)
Baidu crawler xử lý JavaScript poorly, so Hexo static HTML xóa một obstacle
để Baidu phát hiện. Thêm baidu_site_verification trong tiếp theo, generate Baidu-format
sitemap với hexo-generator-baidu-sitemap, và push các URL actively với
hexo-submit-urls-to-search-engine. Một hosting note: GitHub các trang là blocked trong
mainland China — sử dụng Gitee các trang, Cloudflare, hoặc Chinese CDN cho Baidu traffic.
Treat đó as crawlability advantage, không bảo đảm. Static HTML không by itself prove Baidu là discovering, lập chỉ mục, hoặc xếp hạng của bạn các trang — xác nhận thực tế crawl activity và lập chỉ mục status trực tiếp trong Baidu Ziyuan (Baidu quản trị viên web tools) rather hơn assuming static output alone secures visibility.
Deploying để GitHub các trang — SEO gotchas
- đặt
url:để của bạn trực tiếp address (custom domain vớihttps://) trước khi đầu tiên deploy. - Put
CNAMEfile trongsource/cho custom domains so nó không phải reset on mỗihexo deploy. - Enforce HTTPS trong repo Settings → các trang sau khi DNS propagates.
- Ưu tiên GitHub Actions workflow over
hexo-deployer-gitđể tránh CNAME-reset các vấn đề.
Hexo so với. Hugo so với. Jekyll so với. Astro, Đối với SEO
All four ship pure static HTML, so đó indexability floor là giống hệt — có không framework-cấp độ SEO disadvantage trong Hexo. Đó differences là operational: Hugo (Go) xây dựng far nhanh hơn tại lớn quy mô và có một được xây dựng-trong sitemap; Jekyll là đó GitHub Các trang default; Astro ships zero JS theo mặc định qua islands. Hexo edge là một rich npm plugin ecosystem và một lớn Chinese-language community. Nội dung quality, không đó generator, decides thứ hạng — as Mueller đã nói of switching generators, “Will your site’s SEO suddenly explode? No. Also No.” (bản dịch) «Sẽ trang web của bạn SEO suddenly explode? Không. Cũng Không.»
cho cluster overview và khác generators, see Static trang web Generators; cho rộng hơn kết xuất picture, see JavaScript SEO.
AI summary
condensed take on Nâng cao version:
- Hexo là Node.js static trang web generator.
hexo generateoutputs pure static HTML, so nội dung là trong đầu tiên byte của phản hồi — không Web Kết xuất Service, không Wave 2 kết xuất-queue delay. Crawlable<a href>links và cheap-để-crawl CDN files come free. - Static HTML là crawlability floor, không finished SEO. Default themes ship không sitemap, không robots.txt, không theo-post mô tả meta, không canonical, và không dữ liệu có cấu trúc.
- Configure
_config.ymlđầu tiên.url:là phần lớn consequential setting — nó feeds canonicals, sitemap, RSS, và pagination; sai giá trị breaks tất cả them. Subdirectory deploys cũng cầnroot:đặt. Pick sạchpermalink:(tránh:idtoken — nó không phải persistent trên bộ nhớ đệm reset) và đặtmeta_generator: false. theme own config có thể’t override trang web-cấp độurl/root/permalink, và safe-chế độ preview (--safe) disables mỗi plugin và script, so không kiểm tra SEO output ở đó. - Plugin làm nặng lifting:
hexo-generator-sitemap(đọclastmodtừupdatedtrường),hexo-generator-robotstxt,hexo-generator-feed,hexo-indexnow(Bing/Yandex, không Google),hexo-abbrlinkcho ổn định permalinks. - tiếp theo theme: hỗ trợ canonical + Open Graph, nhưng làm không auto-print theo-post mô tả meta — template patch là phần lớn phổ biến khắc phục. nếu theme và SEO plugin có thể cả hai emit giống nhau tags, enable chỉ một theo tag category để tránh duplicates.
- Three traps: sai
url:; date-based default permalink đó breaks links on rename (không bao giờ thay đổi URL không có 301); và auto-generated category/tag archives đó tạo thin duplicate nội dung (noindex hoặc canonicalize). những điều đó archive/tag/ pagination routes come từ Hexo generator API, khôngsource/files — theme/plugin cập nhật có thể silently expand indexable URL surface, so diffpublic/sau khi thay đổi. - Baidu: static output xóa thực obstacle (Baidu crawler xử lý JS poorly), nhưng nó crawlability advantage, không bảo đảm của lập chỉ mục hoặc xếp hạng — xác nhận trong Baidu Ziyuan. GitHub các trang là blocked trong China — sử dụng Gitee/Cloudflare/ Chinese CDN.
- so với. Hugo/Jekyll/Astro: giống nhau indexability floor; Hexo edge là npm plugin ecosystem và Chinese community. nội dung quality decides thứ hạng, không generator.
Tài liệu chính thức
Chính-nguồn tài liệu — từ Hexo, các công cụ tìm kiếm, và Điểm mấu chốt plugin.
Hexo
- Hexo tài liệu — framework overview.
- Configuration —
url,permalink,meta_generator, và rest của_config.yml. - Permalinks — URL pattern variables và tradeoffs.
- Front quan trọng — theo-post các trường Hexo hỗ trợ natively.
- GitHub các trang deployment — chính thức deploy hướng dẫn.
Plugin
- hexo-generator-sitemap — chính thức sitemap plugin.
- hexo-abbrlink — ổn định hash-based permalinks.
- tiếp theo theme SEO settings — canonical, quản trị viên web verification, Open Graph.
các công cụ tìm kiếm — kết xuất, links, sitemaps
- JavaScript SEO basics — crawl → render → chỉ mục phases static xây dựng lets bạn skip cho nội dung.
- Dynamic kết xuất (deprecated) — Google recommending static kết xuất thay vì.
- Làm của bạn links crawlable —
<a href>requirement Hexo satisfies theo mặc định. - SEO Hướng dẫn cho Web Nhà phát triển — các tiêu đề, các mô tả, canonicals, sitemaps, dữ liệu có cấu trúc.
- Bing — Giữ nội dung Discoverable với Sitemaps — XML preference,
lastmodđộ chính xác, và IndexNow.
Quotes từ nguồn
On—record statements từ Google, Bing, và John Mueller đó bear trực tiếp on Hexo (static) trang web.
Google — static kết xuất là được khuyến nghị path
- “Dynamic rendering was a workaround and not a long-term solution for problems with JavaScript-generated content in search engines… Instead, we recommend that you use server-side rendering, static rendering, or hydration as a solution.” (bản dịch) «Dynamic kết xuất đã là một workaround và không một dài-term giải pháp cho các vấn đề với JavaScript-generated nội dung trong các công cụ tìm kiếm… Thay vì, we khuyến nghị đó bạn dùng máy chủ-side kết xuất, static kết xuất, hoặc hydration as một giải pháp.» — Hexo produces static kết xuất. Nguồn
- “Server-side or pre-rendering is still a great idea because it makes your website faster for users and crawlers, and not all bots can run JavaScript.” (bản dịch) «Máy chủ-side hoặc pre-kết xuất là vẫn một great ý tưởng vì điều này làm của bạn website nhanh hơn cho người dùng và các crawler, và không all bots có thể chạy JavaScript.» Nguồn
Bing — sitemaps và freshness
- “XML remains the preferred format for sitemaps” (bản dịch) «XML vẫn đó được ưu tiên format cho sitemaps» — vì điều này hỗ trợ structured metadata như
lastmodcho freshness assessment. Nguồn - On
lastmod: điều này “should reflect the true last modification time of the page content, not the sitemap file itself.” (bản dịch) «nên reflect đó đúng cuối cùng modification time of đó trang nội dung, không đó sitemap file itself.» — đó Hexo gotcha đóupdatedtrường phải được kept hiện tại. Nguồn - “By combining sitemaps for comprehensive site coverage with IndexNow for fast, URL-level submission, you provide the strongest foundation for keeping your content fresh, discoverable, and visible.” (bản dịch) «By combining sitemaps cho comprehensive site coverage với IndexNow cho fast, URL-cấp độ submission, bạn cung cấp đó strongest foundation cho giữ nội dung của bạn fresh, discoverable, và visible.» Nguồn
Gary Illyes, Google — static các trang là cheap để crawl
- “If you are making expensive database calls, that’s going to cost the server a lot.” (bản dịch) «Nếu bạn là đang làm expensive database calls, đó là going để cost đó máy chủ một lot.» — static HTML từ một CDN làm none. Coverage
John Mueller — switching generators không phải itself SEO win
- “Will this change how your site appears in all search engines? Will your site’s SEO suddenly explode? No. Also No.” (bản dịch) «Sẽ này thay đổi cách trang web của bạn xuất hiện trong all các công cụ tìm kiếm? Sẽ trang web của bạn SEO suddenly explode? Không. Cũng Không.» — nội dung quality, không đó generator lựa chọn, drives thứ hạng. Nguồn
Hexo SEO checklist
truyền để xác nhận Hexo trang web là tìm kiếm-friendly — phần lớn của những điều này là off theo mặc định:
-
url:trong_config.ymllà của bạn trực tiếp domain vớihttps://(không placeholder, khônghttp://). Deploying để subdirectory?root:là đặt cũng. - permalink pattern là chosen và sẽ không churn — ideally
:title/hoặchexo-abbrlinkcho ổn định hashes.:idtoken không phải được sử dụng (nó không phải persistent trên database bộ nhớ đệm reset). - nếu cả hai theme và SEO plugin có thể emit canonical/OG/JSON-LD tags, chính xác một của them là enabled cho mỗi tag category — không cả hai.
-
meta_generator: falseđặt để drop Hexo fingerprint (tùy chọn nhưng tidy). -
hexo-generator-sitemapinstalled;sitemap.xmlgenerates và là được gửi trong Google Search Console và Bing Quản trị viên web Tools. -
updated:front quan trọng là kept hiện tại so sitemaplastmodlà chính xác. -
hexo-generator-robotstxtinstalled (hoặc manualrobots.txttrongsource/) với sitemap pointer. - mỗi post có
description:, và theme thực ra prints<meta name="description">(patch tiếp theo nếu needed). - Canonical tags là emitted và resolve để trực tiếp HTTPS các URL (tiếp theo:
canonical: true). - Open Graph / Twitter Card tags present (tiếp theo được xây dựng-trong, hoặc head-một phần edit).
-
BlogPostingJSON-LD đã thêm (template snippet hoặchexo-seoplugin). - Category/tag archives handled — noindexed, canonicalized, hoặc kept chỉ as thực topic hubs (không left as thin duplicates).
- Paginated archive các trang self-canonicalize (trang 2 → trang 2, không trang 1).
- Theme JS/CSS audited trong Lighthouse; minifier + lazy-load image plugin considered.
- GitHub các trang:
CNAMEtrongsource/, HTTPS enforced, deploy qua Actions để tránh CNAME reset. - Baidu các trang: không on GitHub các trang; Baidu verification + Baidu sitemap + URL push configured.
- Không URL bao giờ changed không có 301 chuyển hướng trong place.
Hexo SEO — bảng tra nhanh
On theo mặc định so với. bạn phải thêm nó
| SEO feature | Hexo default | Cách nhận nó |
|---|---|---|
| Static HTML / crawlable nội dung | Có | hexo generate |
Crawlable <a href> links | Có | theme templates |
| XML sitemap | Không | hexo-generator-sitemap |
| robots.txt | Không | hexo-generator-robotstxt hoặc manual file |
| RSS feed | Không | hexo-generator-feed |
| Theo-post mô tả meta | Không (theme-phụ thuộc) | description: + theme patch |
| thẻ canonical | Không (theme-phụ thuộc) | tiếp theo canonical: true |
| Open Graph / Twitter Card | Không (theme-phụ thuộc) | tiếp theo được xây dựng-trong hoặc head-một phần edit |
| Dữ liệu có cấu trúc (JSON-LD) | Không | template snippet hoặc hexo-seo plugin |
| Ổn định permalinks | Không (date/filename based) | hexo-abbrlink |
| IndexNow submission | Không | hexo-indexnow (Bing/Yandex, không Google) |
mấu chốt _config.yml settings
| Setting | Vì sao điều này quan trọng |
|---|---|
url: | Base cho canonical, sitemap, RSS, pagination — sai giá trị breaks tất cả them |
root: | Subdirectory path cho subdirectory deploy — bắt buộc alongside url: hoặc root-relative links break |
permalink: | Default là date-based; :title/ là cleaner; không bao giờ thay đổi sau khi xuất bản; tránh non-persistent :id token |
meta_generator: false | Xóa <meta name="generator" content="Hexo"> tag |
Plugin install commands
npm install hexo-generator-sitemap --save
npm install hexo-generator-robotstxt --save
npm install hexo-generator-feed --save
npm install hexo-abbrlink --save
npm install hexo-indexnow --saveFast facts
- Hexo output skips Google Wave 2 kết xuất queue — nội dung là trong đầu tiên fetch.
lastmodxuất hiện từupdatedtrường (falls back đểdate) — giữ nó hiện tại.<meta name="keywords">là đã bỏ qua by Google (since 2009) — organizational chỉ.- Category/tag archives là auto-generated và thin → noindex hoặc canonicalize.
- Baidu có thể’t crawl JS well → static Hexo là advantage, nhưng GitHub các trang là blocked trong China.
Xây dựng, phục vụ, và verify Hexo trang web
basic Hexo xây dựng loop là giống nhau mọi nơi; shell differs.
macOS / Linux
# install dependencies and the SEO plugins
npm install
npm install hexo-generator-sitemap hexo-generator-robotstxt hexo-generator-feed --save
# clean stale output, then build the static HTML
npx hexo clean && npx hexo generate
# preview locally before deploying
npx hexo server
# confirm the sitemap and robots.txt were actually generated
ls public/sitemap.xml public/robots.txtWindows (PowerShell)
# install dependencies and the SEO plugins
npm install
npm install hexo-generator-sitemap hexo-generator-robotstxt hexo-generator-feed --save
# clean stale output, then build the static HTML
npx hexo clean; npx hexo generate
# preview locally before deploying
npx hexo server
# confirm the sitemap and robots.txt were actually generated
Get-ChildItem public\sitemap.xml, public\robots.txtxác nhận nội dung là trong thô HTML (không JS-được kết xuất)
toàn bộ point của Hexo là đó nội dung là đã trong HTML. Verify nó by kiểm tra đó của bạn post text xuất hiện trong thô phản hồi, trước khi bất kỳ JavaScript chạy.
macOS / Linux
# fetch the raw HTML and search for a phrase from your post body
curl -s https://yourdomain.com/your-post/ | grep -i "a sentence from your post"
# confirm the canonical tag points at the live HTTPS URL
curl -s https://yourdomain.com/your-post/ | grep -i 'rel="canonical"'Windows (PowerShell)
# fetch the raw HTML and search for a phrase from your post body
(Invoke-WebRequest https://yourdomain.com/your-post/).Content | Select-String "a sentence from your post"
# confirm the canonical tag points at the live HTTPS URL
(Invoke-WebRequest https://yourdomain.com/your-post/).Content | Select-String 'rel="canonical"'nếu phrase hiển thị lên trong curl/Invoke-WebRequest output, nó trong static HTML
và Google sees nó on Wave 1 — chính xác Điều gì bạn muốn.
Tools cho Hexo SEO
Hexo plugin ( SEO toolkit)
- hexo-generator-sitemap — chính thức XML sitemap generator; đọc
lastmodtừupdatedtrường. - hexo-generator-robotstxt — generates
robots.txtvới sitemap pointer. - hexo-generator-feed — RSS/Atom feed cho aggregators và Google News eligibility.
- hexo-abbrlink — ổn định, hash-based permalinks đó survive file renames.
- hexo-indexnow / hexo-submit-các URL-để-tìm kiếm-engine — push changed các URL để Bing (IndexNow) và Baidu respectively.
- hexo-all-minifier / hexo-lazyload-image — Core Web Vitals helpers.
- hexo-seo — all-trong-một option với structured-dữ liệu generation.
Kiểm thử và monitoring
- Google Search Console — submit sitemap, inspect các URL, watch lập chỉ mục.
- Bing Quản trị viên web Tools — submit sitemap, configure IndexNow, chạy trang web Scan.
- Baidu Quản trị viên web (Ziyuan) — verification và URL push cho Chinese-audience các trang.
- Lighthouse / PageSpeed Insights — audit theme JS/CSS cho Core Web Vitals regressions.
- View Nguồn / curl — xác nhận nội dung, canonical, và mô tả meta là trong thô HTML (see Scripts tab).
Hexo SEO mistakes để tránh
Concrete mistakes mọi người thực ra làm Khi họ thiết lập hoặc migrate Hexo trang web — prevention, không diagnosis (see Khắc phục sự cố tab cho đó).
Leaving url: as placeholder hoặc on http://
Xuất bản với url: http://yoursite.com vẫn đặt để scaffold default hoặc
sai giao thức là Vì sao nó sai: canonical tags, sitemap, RSS links, và
pagination all xây dựng off điều này một giá trị, so mỗi một của them silently points tại
sai address. Điều gì để làm thay vì: đặt url: để của bạn thực trực tiếp domain với https://
trước khi của bạn đầu tiên hexo generate, và re-kiểm tra nó bất kỳ time bạn move domains.
Renaming post file (hoặc thay đổi của nó slug) với không chuyển hướng
default permalink derives URL từ post filename và date, so renaming
Markdown file hoặc editing date thay đổi trực tiếp URL. Vì sao nó sai: mỗi
inbound link và bất kỳ accumulated tín hiệu xếp hạng on old URL là hiện tại pointing tại
404. Điều gì để làm thay vì: switch để hexo-abbrlink cho ổn định hash-based permalink
trước khi bạn có links để lose, và nếu bạn bao giờ phải thay đổi published URL, thêm 301
chuyển hướng tại của bạn host hoặc CDN.
Shipping không có hexo-generator-sitemap và hexo-generator-robotstxt
Assuming một static site generator “just handles” (bản dịch) «chỉ xử lý» crawler basics là vì sao đây là sai: một
default Hexo install produces neither một sitemap nor một robots.txt — có không
sitemap pointer cho các crawler để tìm. Điều cần làm thay vì: install cả hai plugin,
xác nhận public/sitemap.xml và public/robots.txt exist sau hexo generate, và
submit đó sitemap trong Search Console và Bing Quản trị viên web Tools.
Leaving category và tag archives open để lập chỉ mục tại quy mô
Letting Hexo auto-generated category/tag các trang accumulate as post count grows là Vì sao nó sai: mỗi archive là filled với post excerpts đó duplicate posts themselves, so bạn end lên với hundreds của thin các trang competing cho giống nhau các truy vấn và diluting crawl attention. Điều gì để làm thay vì: noindex archive templates, self-canonicalize paginated archive các trang, hoặc giữ category được lập chỉ mục chỉ Khi nó genuine, curated topic hub.
Assuming hexo-indexnow covers Google cũng
Installing IndexNow và expecting nó để speed lên Google lập chỉ mục là Vì sao nó sai: IndexNow là Bing/Yandex/Baidu giao thức — Google không consume nó cho chung các trang, so bạn vẫn cần được gửi sitemap cho Google-side phát hiện. Điều gì để làm thay vì: sử dụng IndexNow cho Bing/Yandex freshness và rely on sitemap plus thông thường crawling cho Google.
Deploying để GitHub các trang không có durable CNAME
Relying on hexo-deployer-git alone cho custom domain là Vì sao nó sai: some
deploy paths reset hoặc omit CNAME file, mà silently drops của bạn custom domain
back để default github.io address (và breaks HTTPS enforcement). Điều gì để làm
thay vì: giữ CNAME file trong source/ so nó ships với mỗi xây dựng, và ưu tiên
GitHub Actions workflow đó publishes được xây dựng public/ folder intact.
phổ biến Hexo SEO các vấn đề
Symptom-đầu tiên lookup cho các vấn đề bạn đã có on Hexo trang web.
Sitemap.xml trả về 404 sau khi deploy
Symptom: https://yoursite.com/sitemap.xml 404s, hoặc Search Console các báo cáo nó
không thể fetch sitemap.
có khả năng nguyên nhân: hexo-generator-sitemap không phải installed, không phải listed trong
_config.yml, hoặc public/ xây dựng output đã không fully deployed ( một phần upload
hoặc deploy step đó excludes dotfiles/XML).
khắc phục + kiểm tra: chạy npm install hexo-generator-sitemap --save, thêm sitemap:
block để _config.yml, sau đó chạy hexo clean && hexo generate và xác nhận
public/sitemap.xml tồn tại locally trước khi deploying. sau khi redeploying, fetch
trực tiếp URL trực tiếp (curl -I https://yoursite.com/sitemap.xml) và xác nhận 200.
Google Search Console cho thấy các trang as “Discovered — currently not indexed” (bản dịch) «Discovered — hiện tại không được lập chỉ mục»
Symptom: Posts là crawlable và load fine trong một trình duyệt, nhưng Search Console’s Trang Lập chỉ mục báo cáo leaves them trong “Discovered, not indexed” (bản dịch) «Discovered, không được lập chỉ mục» cho weeks.
có khả năng nguyên nhân: thin category/tag archive các trang là eating disproportionate share của crawl attention, hoặc posts themselves là thin/duplicative của archives đó excerpt them.
khắc phục + kiểm tra: noindex hoặc canonicalize auto-generated category/tag archives (see anti-patterns entry trên), yêu cầu lập chỉ mục on handful của affected các URL trong Search Console, và re-kiểm tra trang lập chỉ mục báo cáo sau khi một vài days để couple của weeks — điều này không phải immediate tín hiệu.
Mô tả meta không phải cho thấy lên trong tìm kiếm snippets
Symptom: của bạn post có description: trường trong front quan trọng, nhưng Google hiển thị
auto-generated snippet thay vì, hoặc view-source: hiển thị không
<meta name="description"> tag tại all.
có khả năng nguyên nhân: theme head template không bao giờ prints page.description — Đây là
single phần lớn phổ biến tiếp theo khoảng trống, và nó ảnh hưởng khác themes cũng.
khắc phục + kiểm tra: patch theme head một phần để output
<meta name="description" content="{{ page.description or config.description }}">
(tiếp theo-style templating), rebuild, sau đó curl -s https://yoursite.com/your-post/ | grep -i 'name="description"' để xác nhận tag là present trong thô HTML trước khi bạn chờ
on snippet refresh.
thẻ canonical là bị thiếu hoặc points tại sai URL
Symptom: curling post hiển thị không rel="canonical" tag, hoặc nó resolves để http://
thay vì https://, hoặc để stale domain.
có khả năng nguyên nhân: theme canonical feature không phải enabled (tiếp theo cần
canonical: true trong _config.next.yml), hoặc url: trong main _config.yml là sai
— canonical tags xây dựng off đó base URL.
khắc phục + kiểm tra: xác nhận url: là đúng đầu tiên, enable theme canonical option,
rebuild, và kiểm tra với curl -s https://yoursite.com/your-post/ | grep -i 'rel="canonical"' — giá trị nên chính xác match trực tiếp HTTPS URL.
Custom domain reverts để username.github.io sau khi deploy
Symptom: hoạt động custom domain on GitHub các trang dừng resolving sau khi routine
hexo deploy, falling back để default github.io address.
có khả năng nguyên nhân: deploy xử lý overwrote hoặc omitted CNAME file đó GitHub
các trang đọc để know của bạn custom domain.
khắc phục + kiểm tra: put (hoặc restore) CNAME file containing chỉ của bạn domain trong
source/ so nó copied vào mỗi xây dựng, redeploy, và xác nhận trong repo
Settings → các trang đó custom domain trường vẫn hiển thị của bạn domain với HTTPS
enforced.
Baidu không phải lập chỉ mục trang web tại all
Symptom: Baidu Ziyuan (Baidu Quản trị viên web) hiển thị little để không crawling activity ngay cả though Google indexes trang web fine.
có khả năng nguyên nhân: trang web là hosted on GitHub các trang, mà là blocked trong mainland China, so Baidu crawler thường có thể’t reach nó consistently.
khắc phục + kiểm tra: move Baidu-facing hosting để Gitee các trang, Cloudflare, hoặc Chinese
CDN, thêm Baidu trang web verification và Baidu-format sitemap
(hexo-generator-baidu-sitemap), sau đó watch Baidu Ziyuan crawl-frequency báo cáo
over sau weeks cho renewed activity.
Tự kiểm tra: Hexo SEO
Five nhanh các câu hỏi on đang làm SEO với Hexo static trang web generator. Pick câu trả lời cho mỗi, sau đó kiểm tra.
các tài nguyên worth của bạn time
My related writing
- JavaScript SEO: Definitive Hướng dẫn — kết xuất, DOM parity, và Vì sao static/pre-được kết xuất output là thấp-risk end của spectrum.
- Người mới bắt đầu Hướng dẫn để kỹ thuật SEO — nơi kết xuất architecture fits trong bigger picture.
My speaking
- Cách Tìm kiếm Hoạt động (SlideShare) — my walkthrough of crawling, kết xuất, lập chỉ mục, và xếp hạng. (My standing disclaimer áp dụng: “This is my understanding of systems… not going to be 100% complete or accurate.” (bản dịch) «Này là my understanding of các hệ thống… không going để là 100% hoàn tất hoặc chính xác.»)
từ khoảng ngành
- Hexo tài liệu — tài liệu chính thức cho config, permalinks, front quan trọng, và deployment.
- hexo-generator-sitemap — chính thức sitemap plugin README.
- tiếp theo theme SEO settings — canonical, quản trị viên web verification, và Open Graph cho phần lớn-được sử dụng theme.
- Google — JavaScript SEO basics — crawl → render → chỉ mục phases static xây dựng lets bạn skip cho nội dung.
- Bing — Giữ nội dung Discoverable với Sitemaps — XML preference,
lastmodđộ chính xác, và IndexNow. - John Mueller — Some design decisions — Cách he chạy his own static blog (sitemap + RSS + Bài viết dữ liệu có cấu trúc), và Vì sao switching generators không phải itself SEO win.
Nhật ký thay đổi
Đã cập nhật 8 thg 8, 2026.
Tóm tắt biên tập và chi tiết thay đổi đã ghi nhận.Chi tiết thay đổi
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
Không thể so sánh đầy đủ — không có bản lưu trước đó cho lần sửa đổi này.
Đã cập nhật 18 thg 7, 2026.
Tóm tắt biên tập và chi tiết thay đổi đã ghi nhận.Chi tiết thay đổi
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
-
Ghi chú thay đổi chi tiết hiện chỉ có bằng tiếng Anh.
Không thể so sánh đầy đủ — không có bản lưu trước đó cho lần sửa đổi này.