Closed K1nako0 closed 1 year ago
hexo -s 启动失败
hexo -s
这是 _config_yml 配置文件
_config_yml
# 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: en timezone: '' # URL ## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' url: http://example.com permalink: :year/:month/:day/:title/ permalink_defaults: pretty_urls: trailing_index: true # Set to false to remove trailing 'index.html' from permalinks trailing_html: true # Set to false to remove trailing '.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: false line_number: true auto_detect: false tab_replace: '' wrap: true hljs: false prismjs: enable: false preprocess: true line_number: true 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 ## updated_option supports 'mtime', 'date', 'empty' updated_option: 'mtime' # 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/ theme: shoka # Deployment ## Docs: https://hexo.io/docs/one-command-deployment deploy: type: '' autoprefixer: exclude: - '*.min.css' markdown: render: # 渲染器设置 html: false # 过滤 HTML 标签 xhtmlOut: true # 使用 '/' 来闭合单标签 (比如 <br />)。 breaks: true # 转换段落里的 '\n' 到 <br>。 linkify: true # 将类似 URL 的文本自动转换为链接。 typographer: quotes: '“”‘’' plugins: # markdown-it 插件设置 - plugin: name: markdown-it-toc-and-anchor enable: true options: # 文章目录以及锚点应用的 class 名称,shoka 主题必须设置成这样 tocClassName: 'toc' anchorClassName: 'anchor' - plugin: name: markdown-it-multimd-table enable: true options: multiline: true rowspan: true headerless: true - plugin: name: ./markdown-it-furigana enable: true options: fallbackParens: "()" - plugin: name: ./markdown-it-spoiler enable: true options: title: "你知道得太多了" plugins: - hexo-algoliasearch algolia: appId: #Your appId apiKey: #Your apiKey adminApiKey: #Your adminApiKey chunkSize: 5000 indexName: #"shoka" fields: - title #必须配置 - path #必须配置 - categories #推荐配置 - content:strip:truncate,0,2000 - gallery - photos - tags symbols_count_time: symbols: true time: true total_symbols: true total_time: true exclude_codeblock: false awl: 4 wpm: 275 suffix: "mins." minify: html: enable: true exclude: # 排除 hexo-feed 用到的模板文件 - '**/json.ejs' - '**/atom.ejs' - '**/rss.ejs' css: enable: true exclude: - '**/*.min.css' js: enable: true mangle: toplevel: true output: compress: exclude: - '**/*.min.js' feed: limit: 20 order_by: "-date" tag_dir: "tag" category_dir: "category" rss: enable: true template: "themes/theme/layout/_alternate/rss.ejs" output: "rss.xml" atom: enable: true template: "themes/theme/layout/_alternate/atom.ejs" output: "atom.xml" jsonFeed: enable: true template: "themes/theme/layout/_alternate/json.ejs" output: "feed.json"
已解决,配置放到主题下的 _config.yml
_config.yml
hexo -s
启动失败这是
_config_yml
配置文件