My first Blog

Post

Create a new post

$ hexo new "Name"
$ hexo new post "topic" --path "folder/topic"

Include image in a post

Move the image to the folder created automatically by Hexo, and then use the relative path to refer to the image.

Using hexo syntax, but unable to resize the image:

{% asset_img sample.jpeg 'This is my picture' %}

Or directly use an <img> tag:

<img src="sample.jpeg" style="width: 300px; height: auto;" alt="Sample Image">
Sample Image

With centered alignment:

<div style="text-align: center;">
  <img src="sample.jpeg" style="width: 300px; height: auto;" alt="Sample Image">
</div>
Sample Image

Blog

Generate static files

$ hexo g

Run server

$ hexo s

Deploy

$ hexo d

Generate and Deploy

$ hexo g -d

Post Image

index_img: /img/test.jpeg
banner_img: /img/sky_castle.jpg

Create a new page

$ hexo new page "name"

Creating a new navigation bar

  1. Create a new .ejs file in /themes/fluid/layout/
  2. Add page attributes in _config.fluid.yml, and include a new menu item inside navbar.menu
  3. Modify /themes/fluid/languages/en.yml to add titles and subtitles

My first Blog
http://example.com/2024/06/23/test/
Author
Songlin Zhao
Posted on
June 23, 2024
Licensed under