Skip to content

Commit 5059266

Browse files
authored
copy hexo example from vercel/vercel (#1013)
1 parent 69972a3 commit 5059266

95 files changed

Lines changed: 8500 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
Thumbs.db
3+
db.json
4+
*.log
5+
node_modules/
6+
public/
7+
.deploy*/
8+
.env
9+
.env.build
10+
.vercel
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
![Hexo Logo](https://github.com/vercel/vercel/blob/main/packages/frameworks/logos/hexo.svg)
2+
3+
# Hexo Example
4+
5+
This directory is a brief example of a [Hexo](https://hexo.io/) site that can be deployed to Vercel with zero configuration.
6+
7+
## Deploy Your Own
8+
9+
Deploy your own Hexo project with Vercel.
10+
11+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/framework-boilerplates/hexo&template=hexo)
12+
13+
_Live Example: https://hexo-template.vercel.app_
14+
15+
### How We Created This Example
16+
17+
To get started with Hexo for deployment with Vercel, you can use the [Hexo CLI](https://hexo.io/docs/index.html#Installation) to initialize the project:
18+
19+
```shell
20+
$ hexo init project-name
21+
```
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Hexo Configuration
2+
## Docs: https://hexo.io/docs/configuration.html
3+
## Source: https://github.com/hexojs/hexo/
4+
5+
# Site
6+
title: Hexo
7+
subtitle:
8+
description:
9+
keywords:
10+
author: John Doe
11+
language:
12+
timezone:
13+
14+
# URL
15+
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
16+
url: http://yoursite.com
17+
root: /
18+
permalink: :year/:month/:day/:title/
19+
permalink_defaults:
20+
21+
# Directory
22+
source_dir: source
23+
public_dir: public
24+
tag_dir: tags
25+
archive_dir: archives
26+
category_dir: categories
27+
code_dir: downloads/code
28+
i18n_dir: :lang
29+
skip_render:
30+
31+
# Writing
32+
new_post_name: :title.md # File name of new posts
33+
default_layout: post
34+
titlecase: false # Transform title into titlecase
35+
external_link: true # Open external links in new tab
36+
filename_case: 0
37+
render_drafts: false
38+
post_asset_folder: false
39+
relative_link: false
40+
future: true
41+
highlight:
42+
enable: true
43+
line_number: true
44+
auto_detect: false
45+
tab_replace:
46+
47+
# Home page setting
48+
# path: Root path for your blogs index page. (default = '')
49+
# per_page: Posts displayed per page. (0 = disable pagination)
50+
# order_by: Posts order. (Order by date descending by default)
51+
index_generator:
52+
path: ''
53+
per_page: 10
54+
order_by: -date
55+
56+
# Category & Tag
57+
default_category: uncategorized
58+
category_map:
59+
tag_map:
60+
61+
# Date / Time format
62+
## Hexo uses Moment.js to parse and display date
63+
## You can customize the date format as defined in
64+
## http://momentjs.com/docs/#/displaying/format/
65+
date_format: YYYY-MM-DD
66+
time_format: HH:mm:ss
67+
68+
# Pagination
69+
## Set per_page to 0 to disable pagination
70+
per_page: 10
71+
pagination_dir: page
72+
73+
# Extensions
74+
## Plugins: https://hexo.io/plugins/
75+
## Themes: https://hexo.io/themes/
76+
theme: landscape
77+
78+
# Deployment
79+
## Docs: https://hexo.io/docs/deployment.html
80+
deploy:
81+
type:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "hexo-site",
3+
"version": "0.0.0",
4+
"private": true,
5+
"hexo": {
6+
"version": "5.3.0"
7+
},
8+
"dependencies": {
9+
"hexo": "^5.3.0",
10+
"hexo-generator-archive": "^1.0.0",
11+
"hexo-generator-category": "^1.0.0",
12+
"hexo-generator-index": "^2.0.0",
13+
"hexo-generator-tag": "^1.0.0",
14+
"hexo-renderer-ejs": "^1.0.0",
15+
"hexo-renderer-marked": "^3.3.0",
16+
"hexo-renderer-stylus": "^2.0.1",
17+
"hexo-server": "^2.0.0"
18+
},
19+
"scripts": {
20+
"dev": "hexo server -p $PORT",
21+
"build": "hexo generate"
22+
}
23+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: {{ title }}
3+
tags:
4+
---
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: { { title } }
3+
date: { { date } }
4+
---
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: {{ title }}
3+
date: {{ date }}
4+
tags:
5+
---
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Hello World
3+
---
4+
5+
Welcome to [Hexo](https://hexo.io/)! This is your very first post. Check [documentation](https://hexo.io/docs/) for more info. If you get any problems when using Hexo, you can find the answer in [troubleshooting](https://hexo.io/docs/troubleshooting.html) or you can ask me on [GitHub](https://github.com/hexojs/hexo/issues).
6+
7+
## Quick Start
8+
9+
### Create a new post
10+
11+
```bash
12+
$ hexo new "My New Post"
13+
```
14+
15+
More info: [Writing](https://hexo.io/docs/writing.html)
16+
17+
### Run server
18+
19+
```bash
20+
$ hexo server
21+
```
22+
23+
More info: [Server](https://hexo.io/docs/server.html)
24+
25+
### Generate static files
26+
27+
```bash
28+
$ hexo generate
29+
```
30+
31+
More info: [Generating](https://hexo.io/docs/generating.html)
32+
33+
### Deploy to remote sites
34+
35+
```bash
36+
$ hexo deploy
37+
```
38+
39+
More info: [Deployment](https://hexo.io/docs/deployment.html)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
node_modules
3+
tmp

0 commit comments

Comments
 (0)