Giter Club home page Giter Club logo

jenny's Introduction

Jenny

Jenny is a static blog generator. Its aim is to work with basic Linux tools, but provide some modern conveniences.

  • Lightweight default theme
  • Markdown with Footnotes support, care of a modified Markdown.awk
  • Basic pagination with fixed page numbers
  • Plug your own Markdown parser
  • Heredocs-based template syntax
  • Draft/ignore support (by leaving out the date)
  • Forward-posting, i.e. ignores posts with dates in the future
  • Tags support
  • Modifiable installation prefix
  • Define run-time options in command arguments
  • RSS/Atom feed
  • Tests

Usage

Install Jenny to your local bin folder.

make install

Prepare the directory for your articles and build folder.

mkdir -p ~/blog/.dist

Create a file with a date so that Jenny recognizes it as a published post.

cat <<EOT >> "~/blog/$(date +%Y-%m-%d) first-post.md"
# Hello World

Jenny is a static blog generator using bash, sed, and awk.
EOT

Create a .blogrc file to tell Jenny where the build folder is.

echo "DIST=~/blog/.dist" >> ~/blog/.blogrc

Also, let it know the host name and title of your site.

echo "BLOG_HOST=\"example.com\"" >> ~/blog/.blogrc
echo "BLOG_TITLE=\"Example Title\"" >> ~/blog/.blogrc

Finally, run (cd ~/blog; jenny)

Customization

  1. Copy the layout folder and modify the contents to your liking, make sure to retain existing template tags

    cp -R ./layout ~/blog/.layout
    
  2. Let Jenny know where to find your own layout files

    echo "LAYOUT_DIR=~/blog/.layout" >> ~/blog/.blogrc
    

Other Settings

  • To install into a custom location do: make install PREFIX=~/your/path
  • To uninstall make uninstall in the project folder
  • To configure posts per page: echo "POSTS_PER_PAGE=10" >> ~/blog/.blogrc
  • To use your own markdown parser: echo "MARKDOWN_COMMAND=multimarkdown" >> ~/blog/.blogrc
  • To run a script after the build process, write a post_hook function in .blogrc
  • To use tags add tags: tagname anothertag into a post where tagname is filename friendly
  • To override .blogrc settings use command line arguments: -d for dist folder, -p for posts per page, -l for layout folder

Handy Shortcuts

Add these to your aliases:

# Publish file with current date
publish () {
  mv $1 "$(date +%Y-%m-%d) $1"
}
# Edit file without typing date/full filename
edit () {
  editor $(ls | grep $1)
}

Credits

  • Layout inspired by n-o-d-e.net
  • Some colors from Solarized by Ethan Schoonover
  • Makefile inspired by moebiuseye/skf

License

MIT License

Copyright (c) 2017 Conrado Patricio Ambrosio

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

jenny's People

Contributors

hmngwy avatar avioli avatar

Watchers

 avatar James Cloos 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.