Skip to content

Commit

Permalink
feat(seo): add robots.txt static file. Fixes #658. (#1146)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Zetlen authored and dpatil-magento committed Apr 30, 2019
1 parent a8da67a commit bf434b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/venia-concept/static/robots.txt
@@ -0,0 +1,2 @@
User-agent: *
Allow: /
2 changes: 1 addition & 1 deletion packages/venia-concept/venia-upward.yml
Expand Up @@ -16,7 +16,7 @@ response:
use: index
# serve document root (blank urlKey)
- matches: request.url.pathname
pattern: '^/(icons/.+|favicon.ico$|manifest.json$|veniaClosed.png$)'
pattern: '^/(icons/.+|favicon.ico$|manifest.json$|veniaClosed.png|robots.txt$)'
use: static
# serve anything with a urlKey
- matches: urlKey
Expand Down
4 changes: 2 additions & 2 deletions pwa-devdocs/src/venia-pwa-concept/project-structure/index.md
Expand Up @@ -47,7 +47,7 @@ The UPWARD server combines these templates to create an application shell for di

## The [`static`][] directory

The `static` directory contains the `favicon.ico` icon file, `icons` folder, and other image files.
The `static` directory contains the `favicon.ico` icon file, `icons` folder, `robots.txt` file, and other static files. The `venia-upward.yml` config file file uses an UPWARD DirectoryResolver to serve the files in this directory as static resources.

## The [`src`][] directory

Expand Down Expand Up @@ -177,7 +177,7 @@ The `src/sw.js` file contains the service worker configuration.
[`server.js`]: https://github.com/magento-research/pwa-studio/blob/master/packages/venia-concept/server.js
[`validate-environment.js`]: https://github.com/magento-research/pwa-studio/blob/master/packages/venia-concept/validate-environment.js
[`venia-concept`]: https://github.com/magento-research/pwa-studio/tree/master/packages/venia-concept
[`validate-queries.js`]: https://github.com/magento-research/pwa-studio/blob/master/packages/venia-concept/validate-queries.js
[`validate-queries.js`]: https://github.com/magento-research/pwa-studio/blob/master/packages/venia-concept/validate-queries.js
[`venia-upward.yml`]: https://github.com/magento-research/pwa-studio/blob/master/packages/venia-concept/venia-upward.yml
[`templates`]: https://github.com/magento-research/pwa-studio/tree/master/packages/venia-concept/templates
[`static`]: https://github.com/magento-research/pwa-studio/tree/master/packages/venia-concept/static
Expand Down

0 comments on commit bf434b3

Please sign in to comment.