Coder Social home page Coder Social logo

simpleblog's Introduction

Simpleblog

This is a simple web application that translates markdown text files into html pages surronded by a go text template.

Features

  • Subdomain support
  • Translates folders and markdown files into navigatable website
  • Aimed at being lightweight and simple

Setup

First, download simpleblog using the go get command:

go get github.com/majiru/simpleblog

Usage

Navigate to a directory you want to use for website and run simpleblog init to create the basic directories.

This will create a directory structure like this:

  • domains
    • localhost
      • source
      • static

Create or copy markdown files into the source directory with their build names( index.md, about_thing.md)

From there you can run simpleblog run to serve the content over http on port 8080, there is a (-port, -p) flag that changes this port.

There is an example directory containing source and static directories with this repo.

Subdomains

If you would like to create other subdomains, simply create a folder of the FQDN in the domains folder. Markdown files should be placed in a similar fashion to the root domain.

An example of a directory tree with a blog subdomain with some content might look like this:

  • domains
    • localhost
      • static
      • source
        • index.md
    • mywebsite.org
      • static
      • source
        • index.md
    • blog.mywebsite.org
      • static
      • source
        • index.md

Note that if you are using some sort of web server between simpleblog and the internet then simpleBlog may not be able to gather the original host request which is needed for subdomains. This can be solved by switching the protocol to FastCGI using the (-protocol -r) flags.

Reasoning

I wanted something like werc and thought it would be fun to build a minimalistic web app.

simpleblog's People

Contributors

henesy avatar

Stargazers

 avatar

Watchers

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