|
1 | 1 |  |
2 | 2 |
|
3 | | -# Creative Code Berlin Website |
| 3 | +# Creative Code Berlin website |
4 | 4 |
|
5 | 5 |
|
6 | | -Welcome to the Creative Code Berlin website source code, you can visit our website [creativecode.berlin](http://creativecode.berlin) |
| 6 | +Welcome to the Creative Code Berlin website source code. You can view the site at [creativecode.berlin](http://creativecode.berlin) |
7 | 7 |
|
| 8 | +## Build and run locally |
8 | 9 |
|
9 | | -## Adding Artworks |
| 10 | +After cloning the repo, follow these steps: |
10 | 11 |
|
11 | | -Add the generated JSON generated to the [project.js file](/assets/projects.js). |
12 | | -We must host ShaderToy sketches ourselves since 2026. [Here's how to do it](docs/shadertoy.md). |
| 12 | +```shell |
| 13 | +# Install dependencies |
| 14 | +npm install |
13 | 15 |
|
| 16 | +# Start development server |
| 17 | +npm run dev |
| 18 | +``` |
14 | 19 |
|
15 | | -## Development Instructions |
| 20 | +This renders the site locally. You can browse it at `http://localhost:3000`. The server has hot reloading, so your changes are reflected immediately in the browser. |
16 | 21 |
|
17 | 22 |
|
18 | | -Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more about nuxt.js. |
19 | 23 |
|
20 | | -## Setup |
| 24 | +## Netlify auto-deploy |
21 | 25 |
|
22 | | -Make sure to install the dependencies: |
| 26 | +If you want to publish any changes, create a new branch and work on that. Push the branch to GitHub and create a Pull Request (PR). |
23 | 27 |
|
24 | | -```bash |
25 | | -# npm |
26 | | -npm install |
27 | | -``` |
| 28 | +The Netlify integration will run "checks" in the PR, which include creating a pre-release preview. You can view this at `https://deploy-preview-NNN--vigilant-edison-dfd992.netlify.app`, where NNN is the PR number. Unfortunately this only happens once; if you push additional commits to the PR, the preview is not updated. |
28 | 29 |
|
29 | | -## Development Server |
| 30 | +Merging the PR to master deploys the changes on the live website. |
30 | 31 |
|
31 | | -Start the development server on `http://localhost:3000`: |
| 32 | +The Netlify actions are triggered automagically through the Netlify App, which is configured under the repository's [Settings / GitHub Apps](https://github.com/CreativeCodeBerlin/creativecode.berlin/settings/installations). |
32 | 33 |
|
33 | | -```bash |
34 | | -# npm |
35 | | -npm run dev |
36 | | -``` |
| 34 | +## Adding artworks |
37 | 35 |
|
38 | | -## Production |
| 36 | +Add the generated JSON generated to the [project.js file](/assets/projects.js). |
| 37 | +We must host ShaderToy sketches ourselves since 2026. [Here's how to do it](docs/shadertoy.md). |
39 | 38 |
|
40 | | -Build the application for production: |
41 | 39 |
|
42 | | -```bash |
43 | | -# npm |
44 | | -npm run build |
45 | | -``` |
| 40 | +## More info on Nuxt |
| 41 | + |
| 42 | +The site uses Vue with server-side rendering via Nuxt. More info on Nuxt: [Introduction](https://nuxt.com/docs/4.x/getting-started/introduction) and [Deployment](https://nuxt.com/docs/4.x/getting-started/deployment). |
46 | 43 |
|
47 | | -Locally preview production build: |
| 44 | +The short of it is that the site is authored like a dynamic single-page app built in Vue, except pages are pre-rendered by Nuxt on the server side for speed and static joy. The client-side dynamic fun begins in the `onMounted` hook in the Vue files. |
48 | 45 |
|
49 | | -```bash |
50 | | -# npm |
| 46 | +You can build and view the site's production version locally like so: |
| 47 | + |
| 48 | +```shell |
| 49 | +npm run build |
51 | 50 | npm run preview |
52 | 51 | ``` |
53 | 52 |
|
54 | | -Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. |
0 commit comments