-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy hexo example from vercel/vercel (#1013)
1 parent
69972a3
commit 5059266
Showing
95 changed files
with
8,500 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.DS_Store | ||
Thumbs.db | ||
db.json | ||
*.log | ||
node_modules/ | ||
public/ | ||
.deploy*/ | ||
.env | ||
.env.build | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
 | ||
|
||
# Hexo Example | ||
|
||
This directory is a brief example of a [Hexo](https://hexo.io/) site that can be deployed to Vercel with zero configuration. | ||
|
||
## Deploy Your Own | ||
|
||
Deploy your own Hexo project with Vercel. | ||
|
||
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/framework-boilerplates/hexo&template=hexo) | ||
|
||
_Live Example: https://hexo-template.vercel.app_ | ||
|
||
### How We Created This Example | ||
|
||
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: | ||
|
||
```shell | ||
$ hexo init project-name | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Hexo Configuration | ||
## Docs: https://hexo.io/docs/configuration.html | ||
## Source: https://github.com/hexojs/hexo/ | ||
|
||
# Site | ||
title: Hexo | ||
subtitle: | ||
description: | ||
keywords: | ||
author: John Doe | ||
language: | ||
timezone: | ||
|
||
# URL | ||
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' | ||
url: http://yoursite.com | ||
root: / | ||
permalink: :year/:month/:day/:title/ | ||
permalink_defaults: | ||
|
||
# Directory | ||
source_dir: source | ||
public_dir: public | ||
tag_dir: tags | ||
archive_dir: archives | ||
category_dir: categories | ||
code_dir: downloads/code | ||
i18n_dir: :lang | ||
skip_render: | ||
|
||
# Writing | ||
new_post_name: :title.md # File name of new posts | ||
default_layout: post | ||
titlecase: false # Transform title into titlecase | ||
external_link: true # Open external links in new tab | ||
filename_case: 0 | ||
render_drafts: false | ||
post_asset_folder: false | ||
relative_link: false | ||
future: true | ||
highlight: | ||
enable: true | ||
line_number: true | ||
auto_detect: false | ||
tab_replace: | ||
|
||
# Home page setting | ||
# path: Root path for your blogs index page. (default = '') | ||
# per_page: Posts displayed per page. (0 = disable pagination) | ||
# order_by: Posts order. (Order by date descending by default) | ||
index_generator: | ||
path: '' | ||
per_page: 10 | ||
order_by: -date | ||
|
||
# Category & Tag | ||
default_category: uncategorized | ||
category_map: | ||
tag_map: | ||
|
||
# Date / Time format | ||
## Hexo uses Moment.js to parse and display date | ||
## You can customize the date format as defined in | ||
## http://momentjs.com/docs/#/displaying/format/ | ||
date_format: YYYY-MM-DD | ||
time_format: HH:mm:ss | ||
|
||
# Pagination | ||
## Set per_page to 0 to disable pagination | ||
per_page: 10 | ||
pagination_dir: page | ||
|
||
# Extensions | ||
## Plugins: https://hexo.io/plugins/ | ||
## Themes: https://hexo.io/themes/ | ||
theme: landscape | ||
|
||
# Deployment | ||
## Docs: https://hexo.io/docs/deployment.html | ||
deploy: | ||
type: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "hexo-site", | ||
"version": "0.0.0", | ||
"private": true, | ||
"hexo": { | ||
"version": "5.3.0" | ||
}, | ||
"dependencies": { | ||
"hexo": "^5.3.0", | ||
"hexo-generator-archive": "^1.0.0", | ||
"hexo-generator-category": "^1.0.0", | ||
"hexo-generator-index": "^2.0.0", | ||
"hexo-generator-tag": "^1.0.0", | ||
"hexo-renderer-ejs": "^1.0.0", | ||
"hexo-renderer-marked": "^3.3.0", | ||
"hexo-renderer-stylus": "^2.0.1", | ||
"hexo-server": "^2.0.0" | ||
}, | ||
"scripts": { | ||
"dev": "hexo server -p $PORT", | ||
"build": "hexo generate" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: {{ title }} | ||
tags: | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: { { title } } | ||
date: { { date } } | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: {{ title }} | ||
date: {{ date }} | ||
tags: | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Hello World | ||
--- | ||
|
||
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). | ||
|
||
## Quick Start | ||
|
||
### Create a new post | ||
|
||
```bash | ||
$ hexo new "My New Post" | ||
``` | ||
|
||
More info: [Writing](https://hexo.io/docs/writing.html) | ||
|
||
### Run server | ||
|
||
```bash | ||
$ hexo server | ||
``` | ||
|
||
More info: [Server](https://hexo.io/docs/server.html) | ||
|
||
### Generate static files | ||
|
||
```bash | ||
$ hexo generate | ||
``` | ||
|
||
More info: [Generating](https://hexo.io/docs/generating.html) | ||
|
||
### Deploy to remote sites | ||
|
||
```bash | ||
$ hexo deploy | ||
``` | ||
|
||
More info: [Deployment](https://hexo.io/docs/deployment.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
node_modules | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
module.exports = function(grunt) { | ||
grunt.initConfig({ | ||
gitclone: { | ||
fontawesome: { | ||
options: { | ||
repository: 'https://github.com/FortAwesome/Font-Awesome.git', | ||
directory: 'tmp/fontawesome', | ||
}, | ||
}, | ||
fancybox: { | ||
options: { | ||
repository: 'https://github.com/fancyapps/fancyBox.git', | ||
directory: 'tmp/fancybox', | ||
}, | ||
}, | ||
}, | ||
copy: { | ||
fontawesome: { | ||
expand: true, | ||
cwd: 'tmp/fontawesome/fonts/', | ||
src: ['**'], | ||
dest: 'source/css/fonts/', | ||
}, | ||
fancybox: { | ||
expand: true, | ||
cwd: 'tmp/fancybox/source/', | ||
src: ['**'], | ||
dest: 'source/fancybox/', | ||
}, | ||
}, | ||
_clean: { | ||
tmp: ['tmp'], | ||
fontawesome: ['source/css/fonts'], | ||
fancybox: ['source/fancybox'], | ||
}, | ||
}); | ||
|
||
require('load-grunt-tasks')(grunt); | ||
|
||
grunt.renameTask('clean', '_clean'); | ||
|
||
grunt.registerTask('fontawesome', [ | ||
'gitclone:fontawesome', | ||
'copy:fontawesome', | ||
'_clean:tmp', | ||
]); | ||
grunt.registerTask('fancybox', [ | ||
'gitclone:fancybox', | ||
'copy:fancybox', | ||
'_clean:tmp', | ||
]); | ||
grunt.registerTask('default', ['gitclone', 'copy', '_clean:tmp']); | ||
grunt.registerTask('clean', ['_clean']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright (c) 2013 Tommy Chen | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Landscape | ||
|
||
A brand new default theme for [Hexo]. | ||
|
||
- [Preview](http://hexo.io/hexo-theme-landscape/) | ||
|
||
## Installation | ||
|
||
### Install | ||
|
||
```bash | ||
$ git clone https://github.com/hexojs/hexo-theme-landscape.git themes/landscape | ||
``` | ||
|
||
**Landscape requires Hexo 2.4 and above.** If you would like to enable the RSS, the [hexo-generate-feed] plugin is also required. | ||
|
||
### Enable | ||
|
||
Modify `theme` setting in `_config.yml` to `landscape`. | ||
|
||
### Update | ||
|
||
```bash | ||
cd themes/landscape | ||
git pull | ||
``` | ||
|
||
## Configuration | ||
|
||
```yml | ||
# Header | ||
menu: | ||
Home: / | ||
Archives: /archives | ||
rss: /atom.xml | ||
|
||
# Content | ||
excerpt_link: Read More | ||
fancybox: true | ||
|
||
# Sidebar | ||
sidebar: right | ||
widgets: | ||
- category | ||
- tag | ||
- tagcloud | ||
- archives | ||
- recent_posts | ||
|
||
# Miscellaneous | ||
google_analytics: | ||
favicon: /favicon.png | ||
twitter: | ||
google_plus: | ||
``` | ||
- **menu** - Navigation menu | ||
- **rss** - RSS link | ||
- **excerpt_link** - "Read More" link at the bottom of excerpted articles. `false` to hide the link. | ||
- **fancybox** - Enable [Fancybox] | ||
- **sidebar** - Sidebar style. You can choose `left`, `right`, `bottom` or `false`. | ||
- **widgets** - Widgets displaying in sidebar | ||
- **google_analytics** - Google Analytics ID | ||
- **favicon** - Favicon path | ||
- **twitter** - Twiiter ID | ||
- **google_plus** - Google+ ID | ||
|
||
## Features | ||
|
||
### Fancybox | ||
|
||
Landscape uses [Fancybox] to showcase your photos. You can use Markdown syntax or fancybox tag plugin to add your photos. | ||
|
||
``` | ||
 | ||
|
||
{% fancybox img_url [img_thumbnail] [img_caption] %} | ||
``` | ||
### Sidebar | ||
You can put your sidebar in left side, right side or bottom of your site by editing `sidebar` setting. | ||
Landscape provides 5 built-in widgets: | ||
- category | ||
- tag | ||
- tagcloud | ||
- archives | ||
- recent_posts | ||
All of them are enabled by default. You can edit them in `widget` setting. | ||
## Development | ||
### Requirements | ||
- [Grunt] 0.4+ | ||
- Hexo 2.4+ | ||
### Grunt tasks | ||
- **default** - Download [Fancybox] and [Font Awesome]. | ||
- **fontawesome** - Only download [Font Awesome]. | ||
- **fancybox** - Only download [Fancybox]. | ||
- **clean** - Clean temporarily files and downloaded files. | ||
[hexo]: https://hexo.io/ | ||
[fancybox]: http://fancyapps.com/fancybox/ | ||
[font awesome]: http://fontawesome.io/ | ||
[grunt]: http://gruntjs.com/ | ||
[hexo-generate-feed]: https://github.com/hexojs/hexo-generator-feed |
Oops, something went wrong.