gridsome / gridsome/gridsome

different static files per environment

Open
#244 1 comment 0 reactions 0 assignees View on GitHub
feature request
Dominant language
JavaScript
Stars
8.5k
Forks
466
PR merge metrics
No merged PRs in 30d

Description

## Summary

Some otherwise static files could be different depending on the environment (dev/prod).

### Basic example

Some static files like `robots.txt` would be candidates for this feature. A simple all blocking version could be delivered in the development/staging environment while a SEO optimized version will be delivered for the production environment.

Maybe a naming scheme could be introduced: `./static/__production__robots.txt` or we make use of additional `static` folders that are merged depending on the environment:

```sh
./static # always copied
./static.production # overwrites for production environment
```

### Motivation

This way, the SEO guru doesn't need to be afraid of Google indexed staging pages anymore. For some pages it might be useful to have some files only in production and use less complex test data in development. This might be interesting when used together with tools like NetlifyCMS. I'm pretty sure, there are more use cases that I didn't think of, yet.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.