├── themes └── .gitkeep ├── _config.landscape.yml ├── scaffolds ├── draft.md ├── page.md └── post.md ├── .gitignore ├── .github ├── dependabot.yml └── workflows │ ├── auto-merge.yml │ └── gh-pages.yml ├── package.json ├── LICENSE ├── source └── _posts │ └── hello-template.md ├── _config.yml └── README.md /themes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_config.landscape.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scaffolds/draft.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | tags: 4 | --- 5 | -------------------------------------------------------------------------------- /scaffolds/page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | date: {{ date }} 4 | --- 5 | -------------------------------------------------------------------------------- /scaffolds/post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | date: {{ date }} 4 | tags: 5 | --- 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Thumbs.db 3 | db.json 4 | *.log 5 | node_modules/ 6 | public/ 7 | .deploy*/ 8 | _multiconfig.yml 9 | package-lock.json 10 | yarn.lock -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | open-pull-requests-limit: 10 8 | -------------------------------------------------------------------------------- /.github/workflows/auto-merge.yml: -------------------------------------------------------------------------------- 1 | name: Dependabot Auto Merge 2 | on: 3 | pull_request: 4 | types: [ labeled, edited ] 5 | 6 | jobs: 7 | dependabot: 8 | name: 'Dependabot' 9 | runs-on: ubuntu-latest 10 | permissions: write-all 11 | if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} 12 | steps: 13 | - name: Enable auto-merge for Dependabot PRs 14 | run: gh pr merge --auto --merge "$PR_URL" 15 | env: 16 | PR_URL: ${{ github.event.pull_request.html_url }} 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-template", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "build": "hexo generate", 7 | "clean": "hexo clean", 8 | "deploy": "hexo deploy", 9 | "server": "hexo server" 10 | }, 11 | "hexo": { 12 | "version": "6.1.0" 13 | }, 14 | "dependencies": { 15 | "hexo": "^8.0.0", 16 | "hexo-deployer-git": "^4.0.0", 17 | "hexo-generator-archive": "^2.0.0", 18 | "hexo-generator-category": "^2.0.0", 19 | "hexo-generator-index": "^4.0.0", 20 | "hexo-generator-tag": "^2.0.0", 21 | "hexo-renderer-ejs": "^2.0.0", 22 | "hexo-renderer-marked": "^7.0.0", 23 | "hexo-renderer-stylus": "^3.0.0", 24 | "hexo-server": "^3.0.0", 25 | "hexo-template": "file:", 26 | "hexo-theme-landscape": "^1.0.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Pages - CI 2 | on: 3 | push: 4 | branches: [ main ] 5 | pull_request: 6 | branches: [ main ] 7 | workflow_dispatch: 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 🛎️ 13 | uses: actions/checkout@v3 14 | with: 15 | persist-credentials: false 16 | - name: Install and Build 🔧 17 | run: | 18 | npm install 19 | npm run build 20 | env: 21 | CI: false 22 | - name: Deploy 🚀 23 | uses: JamesIves/github-pages-deploy-action@releases/v3 24 | with: 25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 26 | BRANCH: gh-pages # The branch the action should deploy to. 27 | FOLDER: public # The folder the action should deploy. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 JiJi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /source/_posts/hello-template.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hexo Template 3 | --- 4 | 5 | > A fast, simple & powerful blog framework, powered by [Node.js](https://nodejs.org). Here is the template of it. 6 | 7 | [Demo](https://std.ac/hexo-template) | [Official Website](https://hexo.io) | [Documentation](https://hexo.io/docs/) | [GitHub](https://github.com/mmdjiji/hexo-template) 8 | 9 | ## Get Started 10 | 11 | Use this template and create your repository, there are two lines to modify in `_config.yml`: 12 | 13 | 1. Set your site url at **line 16**. For example, if you use GitHub Page, set url as `https://username.github.io/project`: 14 | ```yml 15 | url: https://std.ac/hexo-template 16 | ``` 17 | 18 | 2. Set your project name at ***line 107**, if your project name is `username` or `username.github.io`, just remove it at the end of `_config.yml`: 19 | ```yml 20 | root: /hexo-template 21 | ``` 22 | 23 | ## CI/CD 24 | 25 | This repository uses GitHub Actions for CI/CD. You don't need to build your documents manually. Just commit your documents (then run `git push`), and then turn on the GitHub Pages in the settings to access your online documents. (For this demo is [https://std.ac/hexo-template](https://std.ac/hexo-template)) 26 | 27 | ## Hexo Features 28 | 29 | - Blazing fast generating 30 | - Support for GitHub Flavored Markdown and most Octopress plugins 31 | - One-command deploy to GitHub Pages, Heroku, etc. 32 | - Powerful API for limitless extensibility 33 | - Hundreds of [themes](https://hexo.io/themes/) & [plugins](https://hexo.io/plugins/) 34 | 35 | ## Commands 36 | 37 | **Install Hexo** 38 | 39 | ``` bash 40 | $ npm install hexo-cli -g 41 | ``` 42 | 43 | Install with [brew](https://brew.sh/) on macOS and Linux: 44 | 45 | ```bash 46 | $ brew install hexo 47 | ``` 48 | 49 | **Setup your blog** 50 | 51 | ``` bash 52 | $ hexo init blog 53 | $ cd blog 54 | ``` 55 | 56 | **Start the server** 57 | 58 | ``` bash 59 | $ hexo server 60 | ``` 61 | 62 | **Create a new post** 63 | 64 | ``` bash 65 | $ hexo new "Hello Hexo" 66 | ``` 67 | 68 | **Generate static files** 69 | 70 | ``` bash 71 | $ hexo generate 72 | ``` 73 | 74 | ## More Information 75 | 76 | - Read the [documentation](https://hexo.io/) 77 | - Visit the [Awesome Hexo](https://github.com/hexojs/awesome-hexo) list 78 | - Find solutions in [troubleshooting](https://hexo.io/docs/troubleshooting.html) 79 | - Join discussion on [Google Group](https://groups.google.com/group/hexo), [Discord](https://discord.gg/teM2Anj), [Gitter](https://gitter.im/hexojs/hexo) or [Telegram](https://t.me/hexojs) 80 | - See the [plugin list](https://hexo.io/plugins/) and the [theme list](https://hexo.io/themes/) on wiki 81 | - Follow [@hexojs](https://twitter.com/hexojs) for latest news 82 | 83 | ## License 84 | 85 | Follows [hexojs/hexo](https://github.com/hexojs/hexo) , use [MIT License](LICENSE). 86 | 87 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fhexojs%2Fhexo.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhexojs%2Fhexo?ref=badge_large) 88 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Hexo Configuration 2 | ## Docs: https://hexo.io/docs/configuration.html 3 | ## Source: https://github.com/hexojs/hexo/ 4 | 5 | # Site 6 | title: Hexo Template 7 | subtitle: '' 8 | description: '' 9 | keywords: 10 | author: JiJi 11 | language: en 12 | timezone: '' 13 | 14 | # URL 15 | ## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' 16 | url: https://std.ac/hexo-template 17 | permalink: :title/ 18 | permalink_defaults: 19 | pretty_urls: 20 | trailing_index: true # Set to false to remove trailing 'index.html' from permalinks 21 | trailing_html: true # Set to false to remove trailing '.html' from permalinks 22 | 23 | # Directory 24 | source_dir: source 25 | public_dir: public 26 | tag_dir: tags 27 | archive_dir: archives 28 | category_dir: categories 29 | code_dir: downloads/code 30 | i18n_dir: :lang 31 | skip_render: 32 | 33 | # Writing 34 | new_post_name: :title.md # File name of new posts 35 | default_layout: post 36 | titlecase: false # Transform title into titlecase 37 | external_link: 38 | enable: true # Open external links in new tab 39 | field: site # Apply to the whole site 40 | exclude: '' 41 | filename_case: 0 42 | render_drafts: false 43 | post_asset_folder: false 44 | relative_link: false 45 | future: true 46 | highlight: 47 | enable: true 48 | line_number: true 49 | auto_detect: false 50 | tab_replace: '' 51 | wrap: true 52 | hljs: false 53 | prismjs: 54 | enable: false 55 | preprocess: true 56 | line_number: true 57 | tab_replace: '' 58 | 59 | # Home page setting 60 | # path: Root path for your blogs index page. (default = '') 61 | # per_page: Posts displayed per page. (0 = disable pagination) 62 | # order_by: Posts order. (Order by date descending by default) 63 | index_generator: 64 | path: '' 65 | per_page: 10 66 | order_by: -date 67 | 68 | # Category & Tag 69 | default_category: uncategorized 70 | category_map: 71 | tag_map: 72 | 73 | # Metadata elements 74 | ## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta 75 | meta_generator: true 76 | 77 | # Date / Time format 78 | ## Hexo uses Moment.js to parse and display date 79 | ## You can customize the date format as defined in 80 | ## http://momentjs.com/docs/#/displaying/format/ 81 | date_format: YYYY-MM-DD 82 | time_format: HH:mm:ss 83 | ## updated_option supports 'mtime', 'date', 'empty' 84 | updated_option: 'mtime' 85 | 86 | # Pagination 87 | ## Set per_page to 0 to disable pagination 88 | per_page: 10 89 | pagination_dir: page 90 | 91 | # Include / Exclude file(s) 92 | ## include:/exclude: options only apply to the 'source/' folder 93 | include: 94 | exclude: 95 | ignore: 96 | 97 | # Extensions 98 | ## Plugins: https://hexo.io/plugins/ 99 | ## Themes: https://hexo.io/themes/ 100 | theme: landscape 101 | 102 | # Deployment 103 | ## Docs: https://hexo.io/docs/one-command-deployment 104 | deploy: 105 | type: '' 106 | 107 | root: /hexo-template 108 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Hexo logo 2 | 3 | # Hexo Template 4 | 5 | > A fast, simple & powerful blog framework, powered by [Node.js](https://nodejs.org). Here is the template of it. 6 | 7 | [Demo](https://std.ac/hexo-template) | 8 | [Official Website](https://hexo.io) | 9 | [Documentation](https://hexo.io/docs/) | 10 | [GitHub](https://github.com/mmdjiji/hexo-template) 11 | 12 | ## Get Started 13 | 14 | Use this template and create your repository, there are two lines to modify in `_config.yml`: 15 | 16 | 1. Set your site url at **line 16**. For example, if you use GitHub Page, set url as `https://username.github.io/project`: 17 | ```yml 18 | url: https://std.ac/hexo-template 19 | ``` 20 | 21 | 2. Set your project name at **line 107**, if your project name is `username` or `username.github.io`, just remove it at the end of `_config.yml`: 22 | ```yml 23 | root: /hexo-template 24 | ``` 25 | 26 | ## CI/CD 27 | 28 | This repository uses GitHub Actions for CI/CD. You don't need to build your documents manually. Just commit your documents (then run `git push`), and then turn on the GitHub Pages in the settings to access your online documents. (For this demo is https://std.ac/hexo-template) 29 | 30 | ## Hexo Features 31 | 32 | - Blazing fast generating 33 | - Support for GitHub Flavored Markdown and most Octopress plugins 34 | - One-command deploy to GitHub Pages, Heroku, etc. 35 | - Powerful API for limitless extensibility 36 | - Hundreds of [themes](https://hexo.io/themes/) & [plugins](https://hexo.io/plugins/) 37 | 38 | ## Commands 39 | 40 | **Install Hexo** 41 | 42 | ``` bash 43 | $ npm install hexo-cli -g 44 | ``` 45 | 46 | Install with [brew](https://brew.sh/) on macOS and Linux: 47 | 48 | ```bash 49 | $ brew install hexo 50 | ``` 51 | 52 | **Setup your blog** 53 | 54 | ``` bash 55 | $ hexo init blog 56 | $ cd blog 57 | ``` 58 | 59 | **Start the server** 60 | 61 | ``` bash 62 | $ hexo server 63 | ``` 64 | 65 | **Create a new post** 66 | 67 | ``` bash 68 | $ hexo new "Hello Hexo" 69 | ``` 70 | 71 | **Generate static files** 72 | 73 | ``` bash 74 | $ hexo generate 75 | ``` 76 | 77 | ## More Information 78 | 79 | - Read the [documentation](https://hexo.io/) 80 | - Visit the [Awesome Hexo](https://github.com/hexojs/awesome-hexo) list 81 | - Find solutions in [troubleshooting](https://hexo.io/docs/troubleshooting.html) 82 | - Join discussion on [Google Group](https://groups.google.com/group/hexo), [Discord](https://discord.gg/teM2Anj), [Gitter](https://gitter.im/hexojs/hexo) or [Telegram](https://t.me/hexojs) 83 | - See the [plugin list](https://hexo.io/plugins/) and the [theme list](https://hexo.io/themes/) on wiki 84 | - Follow [@hexojs](https://twitter.com/hexojs) for latest news 85 | 86 | ## License 87 | 88 | Follows [hexojs/hexo](https://github.com/hexojs/hexo) , use [MIT License](LICENSE). 89 | 90 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fhexojs%2Fhexo.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhexojs%2Fhexo?ref=badge_large) 91 | --------------------------------------------------------------------------------