mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
redirect conference 2022 routes to redirect: https://www.scratchfoundation.org/scratch-conference
This commit is contained in:
parent
335e9ee20e
commit
54b6744599
2 changed files with 19 additions and 4 deletions
17
README.md
17
README.md
|
@ -309,6 +309,23 @@ npm run build && npm run deploy
|
|||
| `AWS_SECRET_ACCESS_KEY` | `''` | AWS secret access key for S3 |
|
||||
| `S3_BUCKET_NAME` | `''` | S3 bucket name to deploy into |
|
||||
|
||||
### Fastly deployment details
|
||||
|
||||
When deploying, Fastly's API is used to clone the active VCL configuration, update just the
|
||||
relevant component with content from this repo's `routes.json` file, and activate the new VCL
|
||||
configuration.
|
||||
|
||||
#### routes.json
|
||||
|
||||
Much of the routes.json file is straightforward, but some fields are not obvious in their purpose.
|
||||
|
||||
`routeAlias` helps us keep the overall length and complexity of the regex comparison code in
|
||||
Fastly from getting too large. There is one large regex which we have Fastly test the incoming
|
||||
request URL against to know if it can reply with a static file in S3; if no match is found, we
|
||||
assume we need to pass the request on to scratchr2. We could test every single route `pattern`
|
||||
regex in `routes.json`, but many are similar, so instead we just take the unique set of all
|
||||
`routeAlias` entries, which is shorter and quicker.
|
||||
|
||||
## Windows
|
||||
|
||||
For development on Windows, you will probably need to use a program that provides you a Unix interface.
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"name": "conference-index",
|
||||
"pattern": "^/conference/?(\\?.*)?$",
|
||||
"routeAlias": "/conference(?!/20[1-2][0-9])",
|
||||
"redirect": "/conference/2022"
|
||||
"redirect": "https://www.scratchfoundation.org/scratch-conference"
|
||||
},
|
||||
{
|
||||
"name": "conference-index-2017",
|
||||
|
@ -122,9 +122,7 @@
|
|||
"name": "conference-index-2022",
|
||||
"pattern": "^/conference/2022/?$",
|
||||
"routeAlias": "/conference(?!/20[1-2][0-9])",
|
||||
"view": "conference/2022/index/index",
|
||||
"title": "Scratch Conferences",
|
||||
"viewportWidth": "device-width"
|
||||
"redirect": "https://www.scratchfoundation.org/scratch-conference"
|
||||
},
|
||||
{
|
||||
"name": "connect",
|
||||
|
|
Loading…
Reference in a new issue