hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.43k stars 4.85k forks source link

Code block line number cannot close #3884

Closed eatradish closed 4 years ago

eatradish commented 4 years ago

Check List

Please check followings before submitting a new issue.

Environment & Settings

Node.js & npm version

➜  blog node -v && npm -v
v12.13.0
6.12.0

Your site _config.yml (Optional)

➜  blog cat _config.yml 
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: Saki.li
subtitle: ''
description: ''
keywords:
author: Saki.Li
language: zh-CN
timezone: ''

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://eatradish.github.io
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing index.html from permalinks

# 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:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: false
  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:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# 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
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
Plugin:
  - hexo-generator-feed
feed:
  type: atom
  path: atom.xml
theme: theme-example
excerpt: false

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: https://github.com/eatradish/eatradish.github.io
  # example, https://github.com/hexojs/hexojs.github.io

Your theme _config.yml (Optional)

➜  theme-example git:(master) ✗ cat _config.yml 
menu:
  Home: /
  Archives: /archives
  About: /me
  RSS: /atom.xml%

Hexo and Plugin version(npm ls --depth 0)

➜  blog npm ls --depth 0
hexo-site@0.0.0 /home/sakiiily/blog
├── hexo@4.0.0
├── hexo-deployer-git@2.0.0
├── hexo-excerpt@1.1.4
├── hexo-generator-archive@1.0.0
├── hexo-generator-category@1.0.0
├── hexo-generator-feed@2.0.0
├── hexo-generator-index@1.0.0
├── hexo-generator-tag@1.0.0
├── hexo-pagination@1.0.0
├── hexo-renderer-ejs@1.0.0
├── hexo-renderer-marked@2.0.0
├── hexo-renderer-stylus@1.1.0
└── hexo-server@1.0.0

Your package.json package.json

➜  blog cat package.json 
{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "4.0.0"
  },
  "dependencies": {
    "hexo": "^4.0.0",
    "hexo-deployer-git": "^2.0.0",
    "hexo-excerpt": "^1.1.4",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-feed": "^2.0.0",
    "hexo-generator-index": "^1.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-pagination": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-server": "^1.0.0"
  }
}

Question

Hi, I use this theme (https://github.com/eatradish/saki.li / https://eatradish.github.io), and at hexo directory (not theme directory) _config.yml:

highlight:
  enable: true
  line_number: false
  auto_detect: false
  tab_replace: ''

but line number cannot close

look this https://eatradish.github.io/2019/11/03/hello-world/

yoshinorin commented 4 years ago

Hexo has db.json for file caching. I think this phenomenon perhaps caused by db.json cache. Please delete db.json once.

You can delete db.json using by hexo clean command. If you won't delete public folder every time for some reason you should not use hexo clean. Because, this command delete the public folder also.

Thanks :)

eatradish commented 4 years ago

Hexo has db.json for file caching. I think this phenomenon perhaps caused by db.json cache. Please delete db.json once.

You can delete db.json using by hexo clean command. If you won't delete public folder every time for some reason you should not use hexo clean. Because, this command delete the public folder also.

Thanks :)

Thanks!