Skip to content

Commit dcb4cbd

Browse files
committed
chore(copywriting): update copy
1 parent 17d3ea5 commit dcb4cbd

6 files changed

Lines changed: 22 additions & 137 deletions

File tree

.docs/content/articles/1.get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Creating a blog with Alpine is a command away, as well as deploying to many plat
1717
Open a terminal an run the following command:
1818

1919
```bash
20-
npx nuxi create alpine my-blog
20+
npx nuxi@latest init -t themes/alpine
2121
```
2222

2323
## Dependencies

.docs/content/articles/2.configure.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export default defineAppConfig({
2121
}
2222
```
2323
24+
You can look at the [default config](https://github.com/nuxt-themes/alpine/tree/dev/app.config.ts).
25+
26+
The [config schema](https://github.com/nuxt-themes/alpine/tree/dev/app.config.ts) also gives comments on all the configuration parameters.
27+
2428
## Meta tags
2529
2630
Configure the title, description and social image of your website:

.docs/content/articles/4.design-tokens.md

Lines changed: 3 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -8,129 +8,8 @@ layout: article
88

99
Leverage the `tokens.config.ts` to give your identity to Alpine.
1010

11-
1. Upgrade nuxt to `2.14.0`
12-
2. Set `target: 'static'` in your `nuxt.config.js`
13-
3. Run `nuxt generate`
14-
4. That's it ✨
11+
Look at the [default tokens config](https://github.com/nuxt-themes/alpine/tree/dev/tokens.config.ts) to check all the Alpine related Design Tokens.
1512

16-
_Bonus: you can run `nuxt start` to run a local server serving your generated static application._
13+
Alpine is also powered by [@nuxt-themes/tokens](https://github.com/nuxt-themes/tokens).
1714

18-
Note: in this video we are using `nuxt export` which has been deprecated in favor of `nuxt generate`.
19-
20-
## Table of Contents
21-
22-
- [Too long to read](#too-long-to-read)
23-
- [Table of Contents](#table-of-contents)
24-
- [History](#history)
25-
- [Current issues](#current-issues)
26-
- [New config option: `target`](#new-config-option-target)
27-
- [Smarter `nuxt generate`](#smarter-nuxt-generate)
28-
- [Crazy fast static applications](#crazy-fast-static-applications)
29-
- [Crawler integrated](#crawler-integrated)
30-
- [Faster re-deploy](#faster-re-deploy)
31-
- [Smarter `nuxt start`](#smarter-nuxt-start)
32-
- [Preview mode](#preview-mode)
33-
- [Commands](#commands)
34-
- [What to do next](#what-to-do-next)
35-
36-
## History
37-
38-
Nuxt had the static generation feature with `nuxt generate` since [v0.3.2](https://github.com/nuxt/nuxt.js/releases/tag/v0.3.2) (November 2016), since then we have improved it in multiple ways but never achieved full static generation. Today I am excited to announce that full static export is now possible with Nuxt 2.13.
39-
40-
## Current issues
41-
42-
`nuxt generate` is mostly pre-rendering, when you navigate client-side, `asyncData` and `fetch` are called, _making a request to your API_. A lot of users asked to support a "full static" mode, meaning to not call these 2 hooks on navigation, since the next page has been already pre-rendered.
43-
44-
Also, the developer experience is not optimal:
45-
46-
- You have access to `req` or `res` on SSR but not when running `nuxt generate`
47-
- `process.static` is `true` only when running `nuxt generate`, making it slow to develop Nuxt modules or plugins for static generation
48-
- You have to specify all your [dynamic routes](/docs/features/file-system-routing#dynamic-routes) in `generate.routes`, making it harder since you don't have access to nuxt modules there.
49-
- You cannot test the [SPA fallback](/docs/concepts/static-site-generation#spa-fallback) in development, the fallback is a client-only version of your Nuxt application that loads when hitting a 404 page
50-
- `nuxt generate` runs `nuxt build` by default, making it slower to generate your website if only your content changed
51-
52-
Note that it was possible to have full static support with [nuxt-payload-extractor](https://github.com/DreaMinder/nuxt-payload-extractor) module but it was more verbose to use and had limitations.
53-
54-
## New config option: `target`
55-
56-
To improve the user experience as well as telling Nuxt that you want to export your application to static hosting, we are introducing a `target` option in your `nuxt.config.js`:
57-
58-
```js{}[nuxt.config.js]
59-
export default {
60-
target: 'static' // default is 'server'
61-
}
62-
```
63-
64-
Full static doesn't work with `ssr: 'false'` (which is the same as the deprecated `mode: 'spa'`) as this is used for client-side rendering only (Single Page Applications).
65-
66-
Running `nuxt dev` with the static target will improve the developer experience:
67-
68-
- Remove `req` & `res` from context
69-
- Fallback to client-side rendering on 404, errors and redirects (see [SPA fallback](/docs/concepts/static-site-generation#spa-fallback))
70-
- `$route.query` will always be equal to `{}` on server-side rendering
71-
- `process.static` is `true`
72-
73-
We are also exposing `process.target` for modules author to add logic depending on the user target.
74-
75-
## Smarter `nuxt generate`
76-
77-
Now with `v2.14.0`, you can use `nuxt generate`, it will smartly know if it has to build or not.
78-
79-
### Crazy fast static applications
80-
81-
`nuxt generate` with `target: 'static'` will pre-render all your pages to HTML and save a payload file in order to mock `asyncData` and `fetch` on client-side navigation, this means **no** **more HTTP calls to your API on client-side navigation.** By extracting the page payload to a js file, **it also reduces the HTML size** served as well as preloading it (from the <link> in the header) for optimal performance.
82-
83-
We also improved the [smart prefetching](/announcements/introducing-smart-prefetching) when doing full static, it will also fetch the payloads, making navigation instant 👀
84-
85-
### Crawler integrated
86-
87-
On top of that, it also has a crawler inside, detecting every relative link and generating it:
88-
89-
If you want to exclude a bunch of routes, use the [generate.exclude](/docs/configuration-glossary/configuration-generate#exclude). You can keep using [generate.routes](/docs/configuration-glossary/configuration-generate#routes) to add extra routes that the crawler could not detect.
90-
91-
To disable the crawler, set `generate.crawler: false` in your `nuxt.config.js`
92-
93-
### Faster re-deploy
94-
95-
By separating `nuxt build` and `nuxt export`, we are opening a new range of improvements: pre-render your pages only if you content has changed, this means: no webpack build → faster re-deployments.
96-
97-
## Smarter `nuxt start`
98-
99-
Once you statically generated your Nuxt app into `dist/`, use `nuxt start` to start a production HTTP server and serve your static app, supporting [SPA Fallback](/docs/concepts/static-site-generation#spa-fallback).
100-
101-
This command is perfect to locally test your static application before pushing to your favorite static hosting provider.
102-
103-
## Preview mode
104-
105-
We do support live preview out of the box to keep calling your API:
106-
107-
```js{}[plugins/preview.client.js]
108-
export default async function ({ query, enablePreview }) {
109-
if (query.preview) {
110-
enablePreview()
111-
}
112-
}
113-
```
114-
115-
It will automatically refresh the page data (calling `nuxtServerInit`, `asyncData` and `fetch`).
116-
117-
When the preview mode is activated, `asyncData` and `fetch` original methods will be called.
118-
119-
## Commands
120-
121-
Depending of the `target`, you can run these commands.
122-
123-
- `server`
124-
- `nuxt dev`: Start the development server
125-
- `nuxt build`: Bundle your Nuxt application for production
126-
- `nuxt start`: Start the production server
127-
- `static`
128-
- `nuxt dev`: Start the development server (static aware)
129-
- `nuxt generate`: Bundle your Nuxt application for production if needed (static aware) and export your application to static HTML in `dist/` directory
130-
- `nuxt start`: Serve your production application from `dist/`
131-
132-
### What to do next
133-
134-
To learn more about how to move from @nuxtjs/dotenv to runtime config check out [this article](/tutorials/moving-from-nuxtjs-dotenv-to-runtime-config).
135-
136-
[Subscribe to the newsletter](#subscribe-to-newsletter) to not miss the upcoming articles and resources.
15+
You can configure all the theme tokens to change the apperance of Alpine.

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![alpine theme](./.docs/public/social-card-preview.png)](https://alpine.nuxt.space)
1+
[![Alpine](./.docs/public/social-card-preview.png)](https://alpine.nuxt.space)
22

33
# Alpine
44

@@ -9,29 +9,34 @@
99

1010
The minimalist blog theme, powered by [Nuxt](https://nuxt.com).
1111

12-
Online demo: [alpine.nuxt.dev](https://alpine.nuxt.space)
12+
13+
- [📸 Online demo](https://alpine.nuxt.space)
14+
- [⚡️ Play on StackBlitz](https://stackblitz.com/github/nuxt-themes/docus-starter)
1315

1416
## Features
1517

16-
- Write pages in Markdown and Vue components
17-
- Blog section
18-
- etc. (TODO)
18+
- Start from a **profile page**, scale to a **complete blog**!
19+
- An [open source blog theme](https://github.com/nuxt-themes/alpine) powered by [Nuxt Content](https://content.nuxtjs.org), editable from [Nuxt Studio](https://studio.nuxt.com).
20+
- Write pages in Markdown and Vue components with the [MDC syntax](https://content.nuxtjs.org/guide/writing/mdc).
21+
- Use [**30+ built-in**](https://elements.nuxt.space) components in your Markdown pages.
1922

2023
## Quick Start
2124

2225
```bash
2326
npx nuxi init my-blog --theme alpine
2427
```
2528

26-
## Contributing
29+
## Contributing 🙏
2730

28-
TODO
31+
1. Clone this repository
32+
2. Install dependencies using `yarn install` or `npm install`
33+
3. Run `npm run prepare` to generate type stubs.
34+
4. Use `npm run dev` to start [playground](./playground) in development mode.
2935

3036
## License
3137

3238
[MIT](./LICENSE)
3339

34-
3540
<!-- Badges -->
3641
[npm-version-src]: https://img.shields.io/npm/v/@nuxt-themes/alpine/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
3742
[npm-version-href]: https://npmjs.com/package/@nuxt-themes/alpine

nuxt.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ const envModules = {
1414
export default defineNuxtConfig({
1515
extends: [envModules.typography, envModules.elements],
1616

17-
// pinceau: {
18-
// preflight: false
19-
// },
20-
2117
runtimeConfig: {
2218
public: {
2319
FORMSPREE_URL: process.env.FORMSPREE_URL

tokens.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default defineTheme({
3030
},
3131
color: {
3232
white: '#FFFFFF',
33+
// @ts-ignore
3334
primary: theme.color.lightblue
3435
},
3536
prose: {

0 commit comments

Comments
 (0)