You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide/20-seo.qmd
+32-16Lines changed: 32 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,9 @@ versions: ">=0.2"
8
8
9
9
# SEO Optimization
10
10
11
-
Great Docs includes comprehensive search engine optimization (SEO) features to help your documentation rank well in search results. These features are enabled by default and work automatically when you build your site.
11
+
Great Docs includes comprehensive search engine optimization (SEO) features to help your
12
+
documentation rank well in search results. These features are enabled by default and work
13
+
automatically when you build your site.
12
14
13
15
## What's Included
14
16
@@ -77,11 +79,13 @@ great-docs seo --json
77
79
}
78
80
```
79
81
80
-
The command exits with code `1` if critical issues are found, making it easy to fail CI builds on SEO problems.
82
+
The command exits with code `1` if critical issues are found, making it easy to fail CI builds on
83
+
SEO problems.
81
84
82
85
## Configuration
83
86
84
-
All SEO settings live under the `seo` key in `great-docs.yml`. Here's the full configuration with defaults:
87
+
All SEO settings live under the `seo` key in `great-docs.yml`. Here's the full configuration with
88
+
defaults:
85
89
86
90
```{.yaml filename="great-docs.yml"}
87
91
seo:
@@ -122,11 +126,13 @@ seo:
122
126
default_description: null # Falls back to package description
123
127
```
124
128
125
-
Most users won't need to change these defaults as they're optimized for typical Python documentation sites.
129
+
Most users won't need to change these defaults as they're optimized for typical Python documentation
130
+
sites.
126
131
127
132
## Sitemap Configuration
128
133
129
-
The sitemap tells search engines about all your pages and how often they change. Great Docs generates different priorities and change frequencies based on page type.
134
+
The sitemap tells search engines about all your pages and how often they change. Great Docs
135
+
generates different priorities and change frequencies based on page type.
130
136
131
137
### Page Types
132
138
@@ -167,7 +173,8 @@ seo:
167
173
168
174
## Robots.txt Configuration
169
175
170
-
The `robots.txt` file tells search engine crawlers which pages to index and where to find your sitemap.
176
+
The `robots.txt` file tells search engine crawlers which pages to index and where to find your
177
+
sitemap.
171
178
172
179
### Default Behavior
173
180
@@ -220,11 +227,13 @@ seo:
220
227
221
228
## Canonical URLs
222
229
223
-
Canonical URLs tell search engines which version of a page is the "official" one, preventing duplicate content issues when your site is accessible via multiple URLs.
230
+
Canonical URLs tell search engines which version of a page is the "official" one, preventing
231
+
duplicate content issues when your site is accessible via multiple URLs.
224
232
225
233
### Auto-Detection
226
234
227
-
Great Docs automatically generates canonical URLs based on your GitHub repository. If your repo is `github.com/username/repo`, the canonical base URL will be:
235
+
Great Docs automatically generates canonical URLs based on your GitHub repository. If your repo is
236
+
`github.com/username/repo`, the canonical base URL will be:
228
237
229
238
```
230
239
https://username.github.io/repo/
@@ -244,7 +253,8 @@ The trailing slash is important (Great Docs will add it if missing).
244
253
245
254
## Page Titles
246
255
247
-
Great Docs applies a consistent title template to all pages, improving brand recognition in search results.
256
+
Great Docs applies a consistent title template to all pages, improving brand recognition in search
257
+
results.
248
258
249
259
### Default Template
250
260
@@ -272,7 +282,8 @@ seo:
272
282
273
283
## Structured Data (JSON-LD)
274
284
275
-
Great Docs injects [JSON-LD](https://json-ld.org/) structured data into your pages, enabling rich search results with additional context about your software.
285
+
Great Docs injects [JSON-LD](https://json-ld.org/) structured data into your pages, enabling rich
286
+
search results with additional context about your software.
276
287
277
288
### What Gets Injected
278
289
@@ -314,14 +325,15 @@ seo:
314
325
315
326
## Meta Descriptions
316
327
317
-
Meta descriptions appear in search result snippets. Great Docs automatically generates them from your page content.
328
+
Meta descriptions appear in search result snippets. Great Docs automatically generates them from
329
+
your page content.
318
330
319
331
### Auto-Generation
320
332
321
333
For each page, Great Docs extracts a description from:
322
334
323
-
1.The first meaningful paragraph in the page content
324
-
2.Falls back to the default description if no suitable content is found
335
+
1.the first meaningful paragraph in the page content
336
+
2.falls back to the default description if no suitable content is found
325
337
326
338
### Setting a Default Description
327
339
@@ -347,7 +359,8 @@ description: "How to install My Package using pip, conda, or from source."
347
359
348
360
## Noindex for Internal Pages
349
361
350
-
Some pages shouldn't appear in search results. Great Docs automatically adds `noindex` directives to internal pages like the Skills page.
362
+
Some pages shouldn't appear in search results. Great Docs automatically adds `noindex` directives to
363
+
internal pages like the Skills page.
351
364
352
365
### Manual Noindex
353
366
@@ -411,11 +424,14 @@ seo:
411
424
base_url: https://docs.myproject.com/
412
425
```
413
426
414
-
And ensure your DNS is configured correctly (see [Adding a Custom Domain](../recipes/add-custom-domain.qmd)).
427
+
And ensure your DNS is configured correctly (see
428
+
[Adding a Custom Domain](../recipes/add-custom-domain.qmd)).
415
429
416
430
## Next Steps
417
431
418
-
Good SEO makes your documentation discoverable. Great Docs handles the technical foundations (sitemaps, canonical URLs, meta tags) automatically, so you can focus on writing clear titles and descriptions.
432
+
Good SEO makes your documentation discoverable. Great Docs handles the technical foundations
433
+
(sitemaps, canonical URLs, meta tags) automatically, so you can focus on writing clear titles and
434
+
descriptions.
419
435
420
436
-[Social Cards](social-cards.qmd) controls how links appear when shared on social platforms
421
437
-[Deployment](deployment.qmd) covers publishing to GitHub Pages with SEO settings applied
0 commit comments