Skip to content

Commit 59dc6e9

Browse files
committed
initial commit
0 parents  commit 59dc6e9

28 files changed

+19229
-0
lines changed

.env.example

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Create one with no scope selected on https://github.com/settings/tokens/new
2+
# This token is used for fetching the repository releases.
3+
GITHUB_TOKEN=

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
node_modules
2+
*.iml
3+
.idea
4+
*.log*
5+
.nuxt
6+
.vscode
7+
.DS_Store
8+
coverage
9+
dist
10+
sw.*
11+
.env
12+
.output

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false

README.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Alpine Starter
2+
3+
Starter template for [Alpine](https://alpine.nuxt.space).
4+
5+
## Clone
6+
7+
Clone the repository (using `nuxi`):
8+
9+
```bash
10+
npx nuxi init -t themes/alpine
11+
```
12+
13+
## Setup
14+
15+
Install dependencies:
16+
17+
```bash
18+
pnpm install
19+
```
20+
21+
## Development
22+
23+
```bash
24+
pnpm dev
25+
```
26+
27+
## Edge Side Rendering
28+
29+
Can be deployed to Vercel Functions, Netlify Functions, AWS, and most Node-compatible environments.
30+
31+
Look at all the available presets [here](https://v3.nuxtjs.org/guide/deploy/presets).
32+
33+
```bash
34+
pnpm build
35+
```
36+
37+
## Static Generation
38+
39+
Use the `generate` command to build your application.
40+
41+
The HTML files will be generated in the .output/public directory and ready to be deployed to any static compatible hosting.
42+
43+
```bash
44+
pnpm generate
45+
```
46+
47+
## Preview build
48+
49+
You might want to preview the result of your build locally, to do so, run the following command:
50+
51+
```bash
52+
pnpm preview
53+
```
54+
55+
---
56+
57+
For a detailed explanation of how things work, check out [Alpine](https://alpine.nuxt.space).

app.config.ts

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
export default defineAppConfig({
2+
alpine: {
3+
title: 'Alpine',
4+
description: 'The minimalist blog theme',
5+
image: {
6+
src: '/social-card-preview.png',
7+
alt: 'An image showcasing my project.',
8+
width: 400,
9+
height: 300
10+
},
11+
header: {
12+
position: 'right', // possible value are : | 'left' | 'center' | 'right'
13+
logo: {
14+
path: '/logo.svg', // path of the logo
15+
pathDark: '/logo-dark.svg', // path of the logo in dark mode, leave this empty if you want to use the same logo
16+
alt: 'alpine' // alt of the logo
17+
}
18+
},
19+
footer: {
20+
credits: {
21+
enabled: true, // possible value are : true | false
22+
repository: 'https://www.github.com/nuxt-themes/alpine' // our github repository
23+
},
24+
navigation: true, // possible value are : true | false
25+
alignment: 'center', // possible value are : 'none' | 'left' | 'center' | 'right'
26+
message: 'Follow me on' // string that will be displayed in the footer (leave empty or delete to disable)
27+
},
28+
socials: {
29+
twitter: 'nuxtlabs',
30+
instagram: 'atinuxt',
31+
linkedin: {
32+
icon: 'uil:linkedin',
33+
label: 'LinkedIn',
34+
href: 'https://www.linkedin.com/company/nuxtlabs'
35+
}
36+
},
37+
form: {
38+
successMessage: 'Message sent. Thank you!'
39+
}
40+
}
41+
})

content/1.index.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: default
3+
head.title: Home
4+
description: An open source blog theme powered by Nuxt.
5+
title: About / HomePage
6+
---
7+
8+
::hero
9+
---
10+
image: '/alpine-0.webp'
11+
---
12+
#title
13+
Hi, Nerando
14+
#description
15+
- An [open source blog theme](https://github.com/nuxt-themes/alpine) powered by [Nuxt Content](https://content.nuxtjs.org), editable on [Nuxt Studio](https://studio.nuxt.com).
16+
- Write pages in Markdown and Vue components with the [MDC syntax](https://content.nuxtjs.org/guide/writing/mdc).
17+
- Use [**30+ built-in**](https://elements.nuxt.space) components in your Markdown pages.
18+
::
19+
20+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim.
21+
22+
Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit.
23+
24+
::gallery
25+
---
26+
images:
27+
- /alpine-0.webp
28+
- /alpine-1.webp
29+
- /alpine-2.webp
30+
---
31+
::

content/2.articles.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: 'Articles'
3+
layout: 'page'
4+
---
5+
6+
::articles-list
7+
---
8+
path: articles
9+
---
10+
::

content/3.contact.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: 'Contact'
3+
layout: 'default'
4+
# Custom og:image
5+
---
6+
7+
# Get in touch
8+
9+
::contact-form
10+
---
11+
fields:
12+
- type: 'text'
13+
name: 'name'
14+
label: 'Your name'
15+
required: true
16+
17+
- type: 'email'
18+
name: 'email'
19+
label: 'Your email'
20+
required: true
21+
22+
- type: 'text'
23+
name: 'subject'
24+
label: 'Subject'
25+
required: false
26+
27+
- type: 'textarea'
28+
name: 'message'
29+
label: 'Message'
30+
required: true
31+
---
32+
::

content/articles/1.get-started.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
cover: /articles/get-started.webp
3+
author:
4+
name: Sébastien Chopin
5+
avatarUrl: https://pbs.twimg.com/profile_images/1042510623962275840/1Iw_Mvud_400x400.jpg
6+
link: https://twitter.com/atinux
7+
date: 2022-08-23
8+
layout: article
9+
---
10+
11+
# Get started with Alpine
12+
13+
Creating a blog with Alpine is a command away, as well as deploying to many platforms.
14+
15+
## Create a blog
16+
17+
Open a terminal an run the following command:
18+
19+
```bash
20+
npx nuxi@latest init -t themes/alpine
21+
```
22+
23+
## Dependencies
24+
25+
Next, go to to `my-blog/` directory and install the dependencies:
26+
27+
```bash
28+
npm install
29+
```
30+
31+
## Development
32+
33+
Start the development server on port 3000:
34+
35+
```bash
36+
npm run dev
37+
```
38+
39+
Next, you can start creating your content in Markdown in the `content/` directory.
40+
41+
42+
## Deploy
43+
44+
### Static hosting
45+
46+
You can deploy Alpine to any static hosting by running the following command:
47+
48+
```bash
49+
npm run generate
50+
```
51+
52+
This command will create a `dist/` directory with the compiled files ready to be uploaded to any static hosting.
53+
54+
### Edge platforms
55+
56+
Alpine supports deploying to the following platforms with **zero configuration**:
57+
58+
- [Vercel](https://vercel.com)
59+
- [Netlify](https://netlify.com)
60+
- [and more...](https://v3.nuxtjs.org/guide/deploy/presets#supported-hosting-providers)
61+
62+
### Node server
63+
64+
You can deploy Alpine to a Node server by running the following command:
65+
66+
```bash
67+
npm run build
68+
```
69+
70+
This command will create a `.output/` directory with the compiled files ready to be uploaded to any Node server.
71+
72+
To start the production server, run the following command:
73+
74+
```bash
75+
node .output/server/index.mjs
76+
```

content/articles/2.configure.md

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
cover: /articles/configure-alpine.webp
3+
author:
4+
name: Clément Ollivier
5+
avatarUrl: https://pbs.twimg.com/profile_images/1370286658432724996/ZMSDzzIi_400x400.jpg
6+
link: https://twitter.com/clemcodes
7+
date: 2022-08-23
8+
description: Learn how to configure Alpine with the app.config.ts file.
9+
layout: article
10+
---
11+
12+
# Configure Alpine
13+
14+
To configure meta tags, social links or even the Alpine theme display, update the `alpine` key in the `app.config.ts` at the root of your project:
15+
16+
```ts [app.config.ts]
17+
export default defineAppConfig({
18+
alpine: {
19+
/* Alpine configuration goes here */
20+
}
21+
}
22+
```
23+
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+
28+
## Meta tags
29+
30+
Configure the title, description and social image of your website:
31+
32+
```ts [app.config.ts]
33+
export default defineAppConfig({
34+
alpine: {
35+
title: 'Alpine',
36+
description: 'The minimalist blog theme',
37+
image: '/social-card-preview.png',
38+
// image can also be an object:
39+
image: {
40+
src: '/social-card-preview.png',
41+
alt: 'An image showcasing my project.',
42+
width: 400,
43+
height: 300
44+
}
45+
}
46+
})
47+
```
48+
49+
## Social links
50+
51+
To configure the social links displayed in the footer, use the `socials` property:
52+
53+
```ts [app.config.ts]
54+
export default defineAppConfig({
55+
alpine: {
56+
socials: {
57+
twitter: 'nuxtlabs',
58+
instagram: 'wearenuxt',
59+
linkedin: {
60+
icon: 'uil:linkedin',
61+
label: 'LinkedIn',
62+
href: 'https://www.linkedin.com/company/nuxtlabs'
63+
}
64+
}
65+
}
66+
})
67+
```
68+
69+
## Theme display
70+
71+
Alpine Header and Footer can also be customized via the `app.config.ts` file:
72+
73+
```ts [app.config.ts]
74+
defineAppConfig({
75+
alpine: {
76+
// Remove header with header: false
77+
header: {
78+
position: 'inline', // possible value are : 'none' | 'left' | 'center' | 'right' | 'inline'
79+
logo: false
80+
},
81+
// Remove header with footer: false
82+
footer: {
83+
credits: {
84+
enabled: true, // possible value are : true | false
85+
repository: 'https://www.github.com/nuxt-themes/alpine' // our github repository
86+
},
87+
navigation: false, // possible value are : true | false
88+
position: 'center', // possible value are : 'none' | 'left' | 'center' | 'right'
89+
message: 'Follow me on' // string that will be displayed on the footer (leave empty or delete to disable)
90+
}
91+
})
92+
```

0 commit comments

Comments
 (0)