|
1 | 1 | ## Introduction to the AWS Cloud Development Kit (CDK) - Workshop
|
2 | 2 |
|
3 |
| -## Developer Guide |
| 3 | +This workshop has been retired. Please refer to the |
| 4 | +[AWS CDK Immersion Day Workshop](https://catalog.us-east-1.prod.workshops.aws/workshops/10141411-0192-4021-afa8-2436f3c66bd8/en-US) |
| 5 | +for the latest content. |
4 | 6 |
|
5 |
| -This workshop is built with markdown as a static HTML site using [hugo](http://gohugo.io). |
6 |
| - |
7 |
| -### Installing Hugo |
8 |
| - |
9 |
| -Because we use asset pipelines and some integrity stamping techniques, we need the "extended" edition. |
10 |
| -(This is the recommended version by Hugo themselves, but it's worth pointing out.) |
11 |
| - |
12 |
| -On MacOS, you can install it straight from Brew: |
13 |
| - |
14 |
| -```bash |
15 |
| -$ brew install hugo |
16 |
| -``` |
17 |
| - |
18 |
| -There are [installation instructions](https://gohugo.io/installation/) available from the Hugo documentation, |
19 |
| -however the short form is "Download the latest extended version from [the releases page](https://github.com/gohugoio/hugo/releases/latest) and put the |
20 |
| -binary in your PATH somewhere". |
21 |
| - |
22 |
| -All else fails, follow the installation instructions. As long as you have the Extended hugo release, it's all good. |
23 |
| - |
24 |
| -### Theme |
25 |
| - |
26 |
| -This is built off the [Hugo-Book](https://github.com/alex-shpak/hugo-book) theme, lightly modified to suit our needs. |
27 |
| -A point of note is that this *Should* eventually be moved to a git submodule, but there's changes that need to be upstreamed. |
28 |
| - |
29 |
| -Notably: |
30 |
| - |
31 |
| -* Upstream does not use any [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) checking. This is done out of paranoia |
32 |
| -* Upstream still has a small handful of inline styles (which I've worked hard to remove) |
33 |
| - |
34 |
| -### Building locally |
35 |
| - |
36 |
| -You'll find the content of the workshop in the [workshop/](workshop/) directory. |
37 |
| - |
38 |
| -You can start up a local development server by running: |
39 |
| - |
40 |
| -```bash |
41 |
| -$ cd workshop |
42 |
| -$ hugo serve |
43 |
| -``` |
44 |
| - |
45 |
| -open http://localhost:1313/ and you'll have the workshop as it stands. |
46 |
| - |
47 |
| -### Adding translations & localization. |
48 |
| - |
49 |
| -Adding a translation means |
50 |
| - |
51 |
| -* Copying the content from `workshop/content/en/` into your own directory (`workshop/content/xx`) |
52 |
| -* Translating the content |
53 |
| -* Adding a configuration for your language in `workshop/config.toml` |
54 |
| -* Adding a translation file for all appropriate legal terms in the `workshop/i18n/xx.yml` file, copied from `en.yml` |
55 |
| - |
56 |
| -**The last part is important**! We need to have a translation for |
57 |
| - |
58 |
| -* "Privacy", "Site Terms" |
59 |
| - |
60 |
| -And we *Should* have a translation for |
61 |
| - |
62 |
| -* The cookie banner message |
63 |
| -* the cookie banner *actions*. |
64 |
| - |
65 |
| -These will fall back to the English ones (such as in the JP one) and the link will go to the appropriate-enough regional terms and privacy pages. |
66 |
| - |
67 |
| -**If your language needs special fonts** in order to render correctly, you should add them in the localization file. |
68 |
| -For example, the Japanese localization uses Noto Sans JP to |
69 |
| -make sure that the typography looks good, as well as using |
70 |
| -two fixed-width typefaces (Nanum Gothic Coding and M PLUS Rounded 1c) |
71 |
| -in order to make the mixed English-Japanese legible for everyone. |
72 |
| - |
73 |
| -```yaml |
74 |
| -- id: fontUrl |
75 |
| - translation: "https://fonts.googleapis.com/css2?family=Nanum+Gothic+Coding:wght@400;700&family=M+PLUS+Rounded+1c:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap" |
76 |
| -- id: bodyFontFamily |
77 |
| - translation: "'Noto Sans JP', sans-serif" |
78 |
| -- id: headingFontFamily |
79 |
| - translation: "'Noto Sans JP', sans-serif" |
80 |
| -- id: codeFontFamily |
81 |
| - translation: "'Nanum Gothic Coding' 'M PLUS Rounded 1c', monospace" |
82 |
| -``` |
83 |
| -
|
84 |
| -
|
85 |
| -There *must* be some backup font included -- The stylesheet will not |
86 |
| -provide one for you. As a rule of thumb, Noto makes a good option for |
87 |
| -most languages, with `sans-serif` falling back on whatever the browser |
88 |
| -can provide most efficiently. Code fonts should be monospace. |
89 |
| - |
90 |
| -If you can, you want at least the following weights: |
91 |
| - |
92 |
| -* 400 (used for body text) |
93 |
| -* 500 (used for for headlines) |
94 |
| -* 700 (used for bold text) |
95 |
| - |
96 |
| -Do *not* use "artsy" typefaces. According to AWS style guides, we |
97 |
| -should be using Ember, but the typeface isn't cleared for hosting on |
98 |
| -GitHub. Until then, we'll use Noto Sans as a default where reasonable. |
99 |
| - |
100 |
| -*The use of serifed headlines is allowed* if the language expects it. |
101 |
| -Chinese is monotonous to read when only presented in "sans". To give |
102 |
| -a clean distinction between headline and body, CJK languages or any |
103 |
| -language which "prefers" a certain type of headline may opt to use |
104 |
| -a "serif" (read: alternate style) headline typeface. |
105 |
| - |
106 |
| -When in doubt, ask a native speaker and look to examples of type in |
107 |
| -that language (technical books, newspapers, etc are good starts) to |
108 |
| -find guidance in what historically separates headline text from the |
109 |
| -body text. AWS customers (and employees!) come from all around the |
110 |
| -world, and this is intended to cater to them. |
111 |
| - |
112 |
| -## Website Infrastructure |
113 |
| - |
114 |
| -The workshop is available at https://cdkworkshop.com. It's a static website hosted on S3 and served through CloudFront. |
115 |
| - |
116 |
| -It is implemented as a (_surprise_) CDK application under the `cdkworkshop.com` |
117 |
| -directory. |
118 |
| - |
119 |
| -* `npm install` - bootstrap. |
120 |
| -* `npm run build` and `npm run watch` |
121 |
| -* `npm run deploy` - build & deploy |
122 |
| - |
123 |
| -### Auto-deployment |
124 |
| - |
125 |
| -You shouldn't have to manually deploy: Any commit merged into `main` should cause the site to self-deploy via CodeBuild. |
126 |
| - |
127 |
| -## License Summary |
128 |
| - |
129 |
| -This sample code is made available under a modified MIT license. See the LICENSE file. |
| 7 | +The content is archived here for reference. |
0 commit comments