Git Product home page Git Product logo

hexo-excerpt's Introduction

hexo-excerpt

Build Status NPM version Coverage Status

Automatic excerpt generator for Hexo!.

Hexo-excerpt: https://chekun.me/post/hexo-excerpt

Installation

$ npm install hexo-excerpt --save

This Plugin use es6 syntax, make sure your node support it.

Features

  • still works!
  • If you're lazy as I am, the plugin generate the excerpt for you, without breaking your sentences or codes!
  • If no tag is specified, the post will be updated with excerpt and more variables.
  • CSS selector can be used to filter generated excerpt.

How?

This plugin runs through all your posts, if your post has more than the configured number of direct tags, then they will be the excerpt, otherwise the whole post will be used.

Configuration

You can specify the size of the excerpt by setting depth in your config, which defaults to 10.

You can also exclude certain tags from the generated excerpt using css selectors. Tags matching any of the selectors will be excluded.

The default behaviour is to only show an excerpt if it would not be the whole post. Set hideWholePostExcerpts to false to override that and show whole post excerpts.

excerpt:
  depth: 10
  excerpt_excludes: []
  more_excludes: []
  hideWholePostExcerpts: true

License

MIT

hexo-excerpt's People

Contributors

chekun avatar dependabot[bot] avatar dorward avatar elxris avatar luckykoala avatar meredrica avatar

Stargazers

 avatar  avatar

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.