Skip to content

Instantly share code, notes, and snippets.

@edwardyi
Forked from btfak/useHexo.md
Created February 12, 2019 07:32
Show Gist options
  • Save edwardyi/ea3d5366ebfe3667d00eec651d865c1c to your computer and use it in GitHub Desktop.
Save edwardyi/ea3d5366ebfe3667d00eec651d865c1c to your computer and use it in GitHub Desktop.

Revisions

  1. yota revised this gist Dec 30, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions useHexo.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ## How to use Hexo and deploy to GitHub Page
    ## How to use Hexo and deploy to GitHub Pages
    * https://github.com/hexojs/hexo
    * https://hexo.io/docs/

    @@ -18,7 +18,7 @@ modules: 14
    openssl: 1.0.1p
    ```

    ### 2. Create a project for your GitHub Page
    ### 2. Create a project for your GitHub Pages
    ```
    $ hexo init yt8yt.github.io
    INFO Copying data to ~/***/yt8yt.github.io
    @@ -100,7 +100,7 @@ https://hexo.io/docs/deployment.html
    $ hexo clean
    $ hexo deploy
    ```
    After writting the above command, you can see your new blog on GitHub Page.
    After writting the above command, you can see your new blog on GitHub Pages.
    http://******.github.io/

    ### 11. Change your blog theme
  2. yt8yt revised this gist Dec 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion useHexo.md
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@ openssl: 1.0.1p
    ### 2. Create a project for your GitHub Page
    ```
    $ hexo init yt8yt.github.io
    INFO Copying data to ~/source/yt8yt.github.io
    INFO Copying data to ~/***/yt8yt.github.io
    INFO You are almost done! Don't forget to run 'npm install' before you start blogging with Hexo!
    $ cd yt8yt.github.io
  3. yt8yt revised this gist Dec 13, 2015. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion useHexo.md
    Original file line number Diff line number Diff line change
    @@ -140,4 +140,7 @@ $ vi index.md
    ```

    ### 13. Use "Read More"
    Write `<!-- more -->` in your articles.
    Write `<!-- more -->` in your articles.

    ### 14. Use Plugins
    https://github.com/hexojs/hexo/wiki/Plugins
  4. yt8yt revised this gist Dec 13, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions useHexo.md
    Original file line number Diff line number Diff line change
    @@ -128,7 +128,7 @@ $ vi _config.yml
    theme: light
    ```

    ### 11. Create a new page file
    ### 12. Create a new page file
    https://hexo.io/docs/writing.html
    ```
    $ hexo new page aboutme
    @@ -139,5 +139,5 @@ $ cd source/aboutme/
    $ vi index.md
    ```

    ### 12. Use "Read More"
    ### 13. Use "Read More"
    Write `<!-- more -->` in your articles.
  5. yt8yt revised this gist Dec 13, 2015. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion useHexo.md
    Original file line number Diff line number Diff line change
    @@ -137,4 +137,7 @@ INFO Created: ~/***/yt8yt.github.io/source/aboutme/index.md
    $ cd source/aboutme/
    $ vi index.md
    ```
    ```

    ### 12. Use "Read More"
    Write `<!-- more -->` in your articles.
  6. yt8yt revised this gist Dec 13, 2015. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions useHexo.md
    Original file line number Diff line number Diff line change
    @@ -131,4 +131,10 @@ theme: light
    ### 11. Create a new page file
    https://hexo.io/docs/writing.html
    ```
    $ hexo new page aboutme
    INFO Created: ~/***/yt8yt.github.io/source/aboutme/index.md
    $ cd source/aboutme/
    $ vi index.md
    ```
  7. yt8yt revised this gist Dec 13, 2015. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions useHexo.md
    Original file line number Diff line number Diff line change
    @@ -127,3 +127,8 @@ $ vi _config.yml
    ## Themes: http://hexo.io/themes/
    theme: light
    ```

    ### 11. Create a new page file
    https://hexo.io/docs/writing.html
    ```
    ```
  8. yt8yt revised this gist Dec 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion useHexo.md
    Original file line number Diff line number Diff line change
    @@ -88,7 +88,7 @@ INFO Created: ~/***/yt8yt.github.io/source/_posts/first-post.md
    ### 8. Edit the above file with Markdown or Hexo's Helper
    Hexo's Helper
    https://hexo.io/docs/helpers.html
    I use Atom with "shift + control + m" :-)
    I use Atom with "shift + control + m" when I use Markdown :-)
    https://atom.io/

    ### 9. Delete "source/_posts/hello-world.md"
  9. yt8yt revised this gist Dec 13, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions useHexo.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ modules: 14
    openssl: 1.0.1p
    ```

    ### 2. Create a directory for your new blog
    ### 2. Create a project for your GitHub Page
    ```
    $ hexo init yt8yt.github.io
    INFO Copying data to ~/source/yt8yt.github.io
    @@ -29,7 +29,7 @@ $ cd yt8yt.github.io
    $ npm install
    ```

    ### 3. Run a test server for your new blog on Mac
    ### 3. Run a test server for your page on Mac
    ```
    $ hexo server
    INFO Hexo is running at http://0.0.0.0:4000/. Press Ctrl+C to stop.
  10. yt8yt revised this gist Dec 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion useHexo.md
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@ title: yt8yt's note
    subtitle:
    description: yt8yt's personal blog
    author: yt8yt
    language: en
    language:
    timezone: Japan
    # URL
  11. yt8yt revised this gist Dec 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion useHexo.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@

    ### 1. Install Hexo
    ```
    $ sudo npm install hexo-cli -g
    $ sudo npm install -g hexo-cli
    $ hexo -v
    hexo-cli: 0.1.9
  12. yt8yt revised this gist Dec 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion useHexo.md
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@ title: yt8yt's note
    subtitle:
    description: yt8yt's personal blog
    author: yt8yt
    language:
    language: en
    timezone: Japan
    # URL
  13. yt8yt renamed this gist Dec 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion how_to_use_Hexo_on_GitHub_Page.md → useHexo.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ## Quick Start
    ## How to use Hexo and deploy to GitHub Page
    * https://github.com/hexojs/hexo
    * https://hexo.io/docs/

  14. yt8yt revised this gist Dec 13, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -97,6 +97,7 @@ It's not necessary to deploy.
    ### 10. Deploy your new blog!!
    https://hexo.io/docs/deployment.html
    ```
    $ hexo clean
    $ hexo deploy
    ```
    After writting the above command, you can see your new blog on GitHub Page.
  15. yt8yt revised this gist Dec 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -102,7 +102,7 @@ $ hexo deploy
    After writting the above command, you can see your new blog on GitHub Page.
    http://******.github.io/

    ### 11. Use blog themes
    ### 11. Change your blog theme
    https://github.com/hexojs/hexo/wiki/Themes
    ```
    For instance, How to use the following theme.
  16. yt8yt revised this gist Dec 13, 2015. 1 changed file with 26 additions and 1 deletion.
    27 changes: 26 additions & 1 deletion how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -100,4 +100,29 @@ https://hexo.io/docs/deployment.html
    $ hexo deploy
    ```
    After writting the above command, you can see your new blog on GitHub Page.
    http://******.github.io/
    http://******.github.io/

    ### 11. Use blog themes
    https://github.com/hexojs/hexo/wiki/Themes
    ```
    For instance, How to use the following theme.
    https://hexo.io/hexo-theme-light/
    ## Install it
    $ cd yt8yt.github.io
    $ git clone git://github.com/tommy351/hexo-theme-light.git themes/light
    ## Update the above files
    $ themes/light
    $ git pull
    ## Set information to use the theme
    $ cd yt8yt.github.io
    $ vi _config.yml
    ~~~~~~~~~~~~~~~~~~ _config.yml ~~~~~~~~~~~~~~~~~~
    # Extensions
    ## Plugins: http://hexo.io/plugins/
    ## Themes: http://hexo.io/themes/
    theme: light
    ```
  17. yt8yt revised this gist Dec 13, 2015. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -98,4 +98,6 @@ It's not necessary to deploy.
    https://hexo.io/docs/deployment.html
    ```
    $ hexo deploy
    ```
    ```
    After writting the above command, you can see your new blog on GitHub Page.
    http://******.github.io/
  18. yt8yt revised this gist Dec 13, 2015. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -85,12 +85,17 @@ $ hexo new first-post
    INFO Created: ~/***/yt8yt.github.io/source/_posts/first-post.md
    ```

    ### 8. Edit the above file with Markdown or Hexo's Markdown
    Hexo's Markdown
    ### 8. Edit the above file with Markdown or Hexo's Helper
    Hexo's Helper
    https://hexo.io/docs/helpers.html
    I use Atom with "shift + control + m" :-)
    https://atom.io/

    ### 9. Delete "source/_posts/hello-world.md"
    It's not necessary to deploy.

    ### 10. Deploy your new blog!!
    https://hexo.io/docs/deployment.html
    ```
    $ hexo deploy
    ```
  19. yt8yt revised this gist Dec 13, 2015. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -85,8 +85,10 @@ $ hexo new first-post
    INFO Created: ~/***/yt8yt.github.io/source/_posts/first-post.md
    ```

    ### 8. Edit the above file
    I use Atom with "shift + control + m" :-)
    ### 8. Edit the above file with Markdown or Hexo's Markdown
    Hexo's Markdown
    https://hexo.io/docs/helpers.html
    I use Atom with "shift + control + m" :-)
    https://atom.io/

    ### 9. Delete "source/_posts/hello-world.md"
  20. yt8yt revised this gist Dec 13, 2015. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -86,5 +86,9 @@ INFO Created: ~/***/yt8yt.github.io/source/_posts/first-post.md
    ```

    ### 8. Edit the above file
    I use Atom with "command + shift + m" :-)
    https://atom.io/
    I use Atom with "shift + control + m" :-)
    https://atom.io/

    ### 9. Delete "source/_posts/hello-world.md"
    It's not necessary to deploy.

  21. yt8yt revised this gist Dec 13, 2015. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -72,15 +72,19 @@ deploy:
    branch: master
    ```

    ### Set "watch" before starting your work
    ### 6. Set "watch" before starting your work
    "watch" command can monitor your files.
    https://hexo.io/docs/generating.html
    ```
    $ hexo generate --watch
    ```

    ### Create a new post
    ### 7. Create a new post file
    ```
    $ hexo new first-post
    INFO Created: ~/***/yt8yt.github.io/source/_posts/first-post.md
    ```
    ```

    ### 8. Edit the above file
    I use Atom with "command + shift + m" :-)
    https://atom.io/
  22. yt8yt revised this gist Dec 13, 2015. 1 changed file with 15 additions and 2 deletions.
    17 changes: 15 additions & 2 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ $ hexo server
    INFO Hexo is running at http://0.0.0.0:4000/. Press Ctrl+C to stop.
    ```

    ### 4. Set information of your new blog
    ### 4. Set information for your new blog
    https://hexo.io/docs/configuration.html
    ```
    $ vi _config.yml
    @@ -44,7 +44,7 @@ $ vi _config.yml
    # Site
    title: yt8yt's note
    subtitle:
    description:
    description: yt8yt's personal blog
    author: yt8yt
    language:
    timezone: Japan
    @@ -70,4 +70,17 @@ deploy:
    type: git
    repo: [email protected]:yt8yt/yt8yt.github.io.git
    branch: master
    ```

    ### Set "watch" before starting your work
    "watch" command can monitor your files.
    https://hexo.io/docs/generating.html
    ```
    $ hexo generate --watch
    ```

    ### Create a new post
    ```
    $ hexo new first-post
    INFO Created: ~/***/yt8yt.github.io/source/_posts/first-post.md
    ```
  23. yt8yt revised this gist Dec 13, 2015. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -55,7 +55,6 @@ url: http://yt8yt.github.io/
    root: /
    permalink: :year/:month/:day/:title/
    permalink_defaults:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ```

    ### 5. Set information to use Git
    @@ -71,5 +70,4 @@ deploy:
    type: git
    repo: [email protected]:yt8yt/yt8yt.github.io.git
    branch: master
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ```
  24. yt8yt revised this gist Dec 13, 2015. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -40,6 +40,7 @@ https://hexo.io/docs/configuration.html
    ```
    $ vi _config.yml
    ~~~~~~~~~~~~~~~~~~ _config.yml ~~~~~~~~~~~~~~~~~~
    # Site
    title: yt8yt's note
    subtitle:
    @@ -54,6 +55,7 @@ url: http://yt8yt.github.io/
    root: /
    permalink: :year/:month/:day/:title/
    permalink_defaults:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ```

    ### 5. Set information to use Git
    @@ -62,10 +64,12 @@ https://github.com/hexojs/hexo-deployer-git
    $ npm install hexo-deployer-git --save
    $ vi _config.yml
    ~~~~~~~~~~~~~~~~~~ _config.yml ~~~~~~~~~~~~~~~~~~
    # Deployment
    ## Docs: http://hexo.io/docs/deployment.html
    deploy:
    type: git
    repo: [email protected]:yt8yt/yt8yt.github.io.git
    branch: master
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ```
  25. yt8yt revised this gist Dec 13, 2015. 1 changed file with 32 additions and 3 deletions.
    35 changes: 32 additions & 3 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    ## Quick Start
    https://github.com/hexojs/hexo
    https://hexo.io/docs/
    * https://github.com/hexojs/hexo
    * https://hexo.io/docs/

    ### 1. Install Hexo
    ```
    $ npm install hexo-cli -g
    $ sudo npm install hexo-cli -g
    $ hexo -v
    hexo-cli: 0.1.9
    @@ -39,4 +39,33 @@ INFO Hexo is running at http://0.0.0.0:4000/. Press Ctrl+C to stop.
    https://hexo.io/docs/configuration.html
    ```
    $ vi _config.yml
    # Site
    title: yt8yt's note
    subtitle:
    description:
    author: yt8yt
    language:
    timezone: Japan
    # URL
    ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
    url: http://yt8yt.github.io/
    root: /
    permalink: :year/:month/:day/:title/
    permalink_defaults:
    ```

    ### 5. Set information to use Git
    https://github.com/hexojs/hexo-deployer-git
    ```
    $ npm install hexo-deployer-git --save
    $ vi _config.yml
    # Deployment
    ## Docs: http://hexo.io/docs/deployment.html
    deploy:
    type: git
    repo: [email protected]:yt8yt/yt8yt.github.io.git
    branch: master
    ```
  26. yt8yt created this gist Dec 13, 2015.
    42 changes: 42 additions & 0 deletions how_to_use_Hexo_on_GitHub_Page.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@
    ## Quick Start
    https://github.com/hexojs/hexo
    https://hexo.io/docs/

    ### 1. Install Hexo
    ```
    $ npm install hexo-cli -g
    $ hexo -v
    hexo-cli: 0.1.9
    os: Darwin 14.3.0 darwin x64
    http_parser: 2.3
    node: 0.12.7
    v8: 3.28.71.19
    uv: 1.6.1
    zlib: 1.2.8
    modules: 14
    openssl: 1.0.1p
    ```

    ### 2. Create a directory for your new blog
    ```
    $ hexo init yt8yt.github.io
    INFO Copying data to ~/source/yt8yt.github.io
    INFO You are almost done! Don't forget to run 'npm install' before you start blogging with Hexo!
    $ cd yt8yt.github.io
    $ npm install
    ```

    ### 3. Run a test server for your new blog on Mac
    ```
    $ hexo server
    INFO Hexo is running at http://0.0.0.0:4000/. Press Ctrl+C to stop.
    ```

    ### 4. Set information of your new blog
    https://hexo.io/docs/configuration.html
    ```
    $ vi _config.yml
    ```