File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/gitbook/src/routes Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " gitbook " : patch
3+ ---
4+
5+ Fix order in robots.txt preventing indexation of images by Google.
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ export async function serveRobotsTxt(context: GitBookSiteContext) {
1313 const lines = isIndexable
1414 ? [
1515 'User-agent: *' ,
16+ // Disallow other dynamic routes / search queries
17+ 'Disallow: /*?' ,
1618 // Allow image resizing and icon generation routes for favicons and search results
1719 'Allow: /~gitbook/image?*' ,
1820 'Allow: /~gitbook/icon?*' ,
19- // Disallow other dynamic routes / search queries
20- 'Disallow: /*?' ,
2121 'Allow: /' ,
2222 `Sitemap: ${ linker . toAbsoluteURL ( linker . toPathInSpace ( isRoot ? '/sitemap.xml' : '/sitemap-pages.xml' ) ) } ` ,
2323 ]
You can’t perform that action at this time.
0 commit comments