SEO (Search Engine Optimization)
Meta Generator Tag
Remove the <meta name="generator"> tag that Hexo adds to every page (recommended for cleaner HTML):
1 | meta_generator: false |
Set this in your main Hexo _config.yml, not the theme config.
Structured Data
Inside can render JSON-LD structured data in <head> for richer search results (breadcrumbs, article metadata, etc.):
1 | seo: |
This outputs standard Article, BreadcrumbList, and WebSite schema types that Google Search understands.
Server-Side Rendering (SSR)
Inside is built with Angular and outputs a full SPA by default. For SEO, this means search engine crawlers see an empty shell if you don’t pre-render.
Enable SSR mode:
1 | seo: |
When ssr: true, Inside pre-renders the initial HTML on the server (using the _ssr.js bundle) so crawlers see fully populated content.
Note: SSR requires more server resources than static hosting. If you deploy to GitHub Pages or a static CDN, leave
ssr: falseand usestructured_data: trueinstead for SEO benefits.
Sitemap
Hexo has an official hexo-generator-sitemap plugin. Install it:
1 | npm install hexo-generator-sitemap --save |
This auto-generates sitemap.xml at your site root on every build. No additional Inside configuration needed.
For Chinese search engines, also add:
1 | npm install hexo-generator-baidurl --save |
Canonical URLs
Set your production URL in Hexo’s _config.yml:
1 | url: https://blog.oniuo.com |
Hexo and Inside automatically generate <link rel="canonical"> tags pointing to the canonical URL of each page, preventing duplicate content issues.
Robots.txt
Place a robots.txt file in your source/ directory:
PWA (Progressive Web App)
Inside has built-in PWA support via Google’s Workbox library. A properly configured PWA can be installed on mobile/desktop and works offline.
Enable Workbox (Service Worker)
1 | pwa: |
Cache strategies:
| Strategy | Behavior |
|---|---|
cacheFirst |
Use cached version; fall back to network |
cacheOnly |
Only use cache, never network |
networkFirst |
Try network; fall back to cache |
staleWhileRevalidate |
Serve cached immediately; update cache in background |
Web App Manifest
The manifest controls how your site appears when installed:
1 | pwa: |
Generate icons at favicon.io or pwabuilder.com.
Complete PWA Configuration
1 | pwa: |
Google Analytics
Add a Google Analytics tracking ID:
1 | ga: UA-00000000-0 |
Inside injects the GA tracking script into every page automatically.
For GA4, use the newer
gtag.jsapproach via the plugin injection system instead.
Next Steps
- Plugin System → — Inject custom scripts, styles, and HTML snippets
- Appearance → — Fine-tune colors, fonts, and dark mode
