Git Product home page Git Product logo

blognow's Introduction

Blognow Build status Go Report Card

Blognow is a static site generator for blogs.

There is no configuration, confusing theme files, or complex hierarchies of pages and posts. It uses an opinionated, straightforward design courtesy of Water.css.

Build

To build the binary, run

go build .

You should then have the binary blognow in the same directory as the project. The path to the binary can then be added to the PATH for easy usage no matter where you are.

Usage

blognow my-blog creates a new blog in the directory my-blog.

You'll see a few directories inside:

  • posts is where you write posts as .md files
  • templates are the HTML templates (you shouldn't need to modify anything here)
  • config.toml is a configuration file, ready to go. It really is no configuration, but you may want to change the name of the blog.

config.toml

A default config file is automatically created when you make a new blog.

baseURL = "https://example.org/"
title = "My Blog"
tagline = "Don't sail too close to the wind"
dateFormat = "2 January 2006"

There is no configuration apart from the four lines you see here.

Generating the blog

blognow generates a static site in dist/. You can copy these files to any place where you can host static websites. It looks in the posts/ directory and formats any correctly structured .md file as HTML.

It creates an index page (the latest post), individual post pages, and an archive page.

Post format

---
title = "Post Title"
date = 2019-06-28
---

# Heading 1
## Heading 2
### Heading 3

This is a paragraph.

- This
- is
- a
- list.

Refer to a Markdown reference for a complete list of formatting options.

Running your blog locally

$ npm i http-server -g
$ http-server dist/

Screenshots

Dark theme

If the computer is set to use a dark theme, a dark theme will automatically be applied.

Contribute

Blognow is currently under development. If you would like to report an issue or suggest a feature, please do so!

Pull requests are welcome!

License

MIT

blognow's People

Contributors

johnjago avatar

Watchers

 avatar  avatar  avatar

blognow's Issues

Generate a static site from post files

A writer should be able to run the command blognow in the root directory of a blog to generate the static site in dist/ from a configuration file and all the post files in Markdown format in post/.

The front page will have the blog title, a tagline, the most recent post, and a link to see all posts. Post pages will have the same information.

Tasks

  • Create a template for the front page/single post page.
  • Create a template for the "all posts" page.
  • Add tagline support.
  • Generate a single post in HTML from the respective markdown file.
  • Generate the "all posts" page based on all titles and dates read in from each post file.
  • Create output in dist/. There will be an index.html (the most recent post) along with a directory for each post (directory title/slug comes from the post's title). Inside the directory will be an index.html file containing that post.

Below are some examples of what I'm thinking it will look like:

Screenshot-2019-7-14 Matt

Screenshot-2019-7-14 zen habits


Screenshot-2019-6-28 inimino's blog

I this good to go?

Is this ok to use now? I'm testing out some blogs lately.

If yes, any chance to add tags?

I'm on Windows7, can I "go get" to make it work here?

Is this to replace your Hugo site?

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.