Coder Social home page Coder Social logo

zthxxx / hexo-directory-category Goto Github PK

View Code? Open in Web Editor NEW
42.0 2.0 4.0 1.27 MB

Automatically add category to Hexo article according to the article file directory.

License: MIT License

JavaScript 100.00%
hexo plugin hexo-plugin category directory categories

hexo-directory-category's Introduction

Hello World!

zthxxx's Github Stats

Hi, I'm zthxxx, a web developer 😄

💖 Love open-source work and watching anime 👀

💡 Passion for do project that improve dev experience, or relate to anime

⚡ Always in learning some cool technology driven by curiosity 😎

Tools & Interests

Games

Genshin Impact

Viewer

hexo-directory-category's People

Contributors

joont92 avatar zq1997 avatar zthxxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hexo-directory-category's Issues

反向识别category_map

假设存在

category_map:
  参考资料: Reference

预期结果:为/_posts/Reference下的所有文件添加分类参考资料

这可以使URL更友好

rule must be a function, a string or a regular expression

There is an error blow.

version

new:

node:12.14.1
hexo: "version": "3.9.0"
"hexo-directory-category": "^1.0.7",

old(2018.11 it's ok):

hexo: "version": "3.5.0"
hexo-directory-category: "^1.0.3",

error

ERROR Plugin load failed: hexo-directory-category
TypeError: rule must be a function, a string or a regular expression.
at new Pattern (F:\ablob\node_modules_hexo-util@0.6.3@hexo-util\lib\pattern.js:17:11)
at Processor.register (F:\ablob\node_modules_hexo@3.9.0@hexo\lib\extend\processor.js:31:14)
at F:\ablob\node_modules\hexo-directory-category\index.js:14:23
at F:\ablob\node_modules_hexo@3.9.0@hexo\lib\hexo\index.js:232:12
at tryCatcher (F:\ablob\node_modules_bluebird@3.7.2@bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (F:\ablob\node_modules_bluebird@3.7.2@bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (F:\ablob\node_modules_bluebird@3.7.2@bluebird\js\release\promise.js:604:18)

插件无效果?

主题是:https://github.com/blinkfox/hexo-theme-matery
最新版hexo,
安装步骤:

  1. 安装插件后,
  2. 在_post目录新建一个PT文件夹,通过hexo n abc新建了一个abc.md文件并移动到PT这个文件夹内
  3. 网站根目录的_config.yml按照设置两个都是true
  4. scaffolds/post.md信息如下:
---
title: {{ title }}
date: {{ date }}
tags: 
category:
comments: true
updated: {{ updated }}
top: true
cover: false
coverImg: 
author: 
img: 
mathjax: false
---

最开始post.md有category这一行,自动生成的abc.md也有那一行,但默认冒号后什么都没写,hexo clean && hexo g之后,打开abc.md没有发现category:有任何变化,abc.md和post.md都删掉category:之后再hexo g,依旧无效,没有添加进任何信息?是我哪里理解错误了吗?

关于在next主题下的应用

您好,我之前搭建博客使用的是next主题,感觉更改主题有点麻烦。想直接使用您的这个插件,但是现在出现的问题是:安装并配置您的这个插件后,设置参数为

auto_dir_categorize:
	enable: true  # options:true, false; default is true
	force: true

会导致出现两级目录,例如file: ./_posts/Linux/Vim.mdcategories: [Linux],那么生成的html目录为Linux/Linux。若categories: [...],生成的html目录为uncategorized/Linux
请问我需要更改什么文件去修复这个问题?谢谢~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.