forked from Polymer/old-docs-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.yaml
198 lines (162 loc) · 5.29 KB
/
app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
application: polymer-project
version: component-swap
runtime: python27
api_version: 1
threadsafe: yes
#default_expiration: "0s"
libraries:
- name: PIL
version: latest
#inbound_services:
#- warmup
handlers:
- url: /latest.*
script: main.app
secure: always
- url: /robots.txt
static_files: robots.txt
upload: robots.txt
# These needs to be in this order and come for the short URL versions.
# Map unversioned wc.js allowed because it will churn less.
- url: /webcomponents(\.min)?.js$
static_files: _site/0.5/components/webcomponentsjs/webcomponents.min.js
upload: 0.5/components/webcomponentsjs/webcomponents(\.min)?.js
http_headers:
Access-Control-Allow-Origin: "*"
- url: /(.+)/components/(.*)/webcomponents(\.min)?.js$
static_files: _site/\1/components/\2/webcomponents.min.js
upload: (.+)/components/(.*)/webcomponents(\.min)?.js
http_headers:
Access-Control-Allow-Origin: "*"
- url: /(.+)/components/(.*)/polymer(\.min)?.js$
static_files: _site/\1/components/\2/polymer.min.js
upload: (.+)/components/(.*)/polymer(\.min)?.js
http_headers:
Access-Control-Allow-Origin: "*"
- url: /(.+)/components/(.*)
static_files: _site/\1/components/\2
upload: (.+)/components/(.*)
http_headers:
Access-Control-Allow-Origin: "*"
# Short URLs -------------------------------------------------------------------
# For webcomponents.js, serve both minified and non-minifed versions
# Workaround for https://github.com/Polymer/docs/issues/823 -- always serve minified
- url: /(.+)/webcomponents(\.min)?.js$
static_files: _site/\1/components/webcomponentsjs/webcomponents.min.js
upload: (.+)/components/webcomponentsjs/webcomponents(\.min)?.js
http_headers:
Access-Control-Allow-Origin: "*"
# These two rules need to proceed the one that follows so the redirect can catch it.
- url: /(.+)/docs/polymer/polymer.html$
static_files: _site/\1/docs/polymer/polymer.html
upload: _site/(.+)/docs/polymer/polymer.html
http_headers:
Access-Control-Allow-Origin: "*"
- url: /docs/polymer/polymer.html$
script: main.app
- url: /(.+)/polymer.html$
static_files: _site/\1/components/polymer/polymer.html
upload: (.+)/components/polymer/polymer.html
http_headers:
Access-Control-Allow-Origin: "*"
- url: /(.+)/polymer(\.min)?.js$
static_files: _site/\1/components/polymer/polymer.min.js
upload: (.+)/components/polymer/polymer(\.min)?.js
http_headers:
Access-Control-Allow-Origin: "*"
- url: /(.+)/layout.html$
static_files: _site/\1/components/polymer/layout.html
upload: (.+)/components/polymer/layout.html
http_headers:
Access-Control-Allow-Origin: "*"
# This needs to appear above the redirect block below, otherwise anything with a
# trailing slash will fail to redirect
# Example: /0.5/docs/start/getting-the-code.html
# - url: /(.+)/docs/
# static_files: _site/docs/\1
# upload: _site/(.+)/docs/
# secure: always
# http_headers:
# Access-Control-Allow-Origin: "*"
# Redirects --------------------------------------------------------------------
- url: /$
#static_files: _site/index.html
#upload: _site/index\.html
script: main.app
secure: always
# No version in URL goes through redirect to latest version.
# Also redirect old apps and tools stuff.
- url: /(apps|docs|platform|resources|tools|articles)/.*
script: main.app
# Obsolete versions need redirects, too.
- url: /0.[89]/.*
script: main.app
- url: /docs/elements/(core|paper)-elements.html
script: main.app
# Special exception for the summit site so it doesn't require
# a trailing slash
- url: /summit
static_files: _site/summit/dist/index.html
upload: _site/summit/dist/index.html
secure: always
- url: /summit/$
static_files: _site/summit/dist/index.html
upload: _site/summit/dist/index.html
secure: always
- url: /summit/(schedule|speakers)
static_files: _site/summit/dist/index.html
upload: _site/summit/dist/index.html
secure: always
- url: /summit/codelabs/$
static_files: _site/summit/dist/codelabs.html
upload: _site/summit/dist/codelabs.html
secure: always
- url: /summit/codelabs$
static_files: _site/summit/dist/codelabs.html
upload: _site/summit/dist/codelabs.html
secure: always
- url: /summit/(.*)
static_files: _site/summit/dist/\1
upload: _site/summit/dist/(.*)
secure: always
# Map raw paths with trailing "/" to an index.html file.
- url: /(.*)/$
static_files: _site/\1/index.html
upload: _site/(.*)/index.html
secure: always
# All other URLs map directly to their path in _site/.
- url: /
static_dir: _site
http_headers:
Access-Control-Allow-Origin: "*"
secure: always
skip_files:
- ^(.*/)?app\.yaml
- ^(.*/)?app\.yml
- ^(.*/)?index\.yaml
- ^(.*/)?index\.yml
- ^(.*/)?#.*#
- ^(.*/)?.*~
- ^(.*/)?.*\.py[co]
- ^(.*/)?.*/RCS/.*
- ^(.*/)?\..*
- ^(.*/)?.*\.bak$
- ^(.*/)?node_modules/.*
- ^(.*/)?third_party/closure/.*
- ^.*.md|markdown
- ^(.*/)?.*\.sublime-project
- ^(.*/)?.*\.sublime-workspace
- ^(.*/)?(AUTHORS|LICENSE|PATENTS|COPYING|CONTRIBUTING|README)$
- ^(.*/)?Makefile$
- ^(.*/)?codereview.setting
# Jekyll/build dirs
- ^_(data|includes|layouts|plugins)/
- ^sass$
- ^scripts$
# Summit source
- ^summit\/app$
- ^(\d.\d(.\d)?)$ # Exclude version dirs. They're in _site/.
# few extras to reduce number of files uploaded.
- ^(.*/)?components/web-component-tester/.*
- ^(.*/)?components/font-awesome/(less|scss)/.*
- ^(.*/)?components/.*/test/.*