Giter Club home page Giter Club logo

blok's Introduction

blok

A simple static site generator for Pythonista + Editorial on iPad & iPhone: write in Editorial and send to blok.

If you have feedback or actually use this, please let me know! Pull requests welcome.

How it works

  1. In build_site(), each post is read, converted to html, and then added to an html template and written to the output directory.

    If in posts/ there's a post 03-05-2015-test-post.markdown, it will be wriiten to OUTPUT_DIR/test-post/index.html.

  2. After the posts are written, a link is added for each post in the main index.html. For the test post above, the link would be /test-post/. This gives nice links with no '.html' on the end.

  3. Next, any CSS files in STATIC_DIR/css are copied to OUTPUT_DIR/css. Links to css files are added in the pervious step.

    The css-copying code will probably get made into a function and generalized, so we can copy images and so on.

Editorial workflows:

  • New post - a UI for making a new post in Editorial. If you tell it to use the existing file, the contents of the file are added to the post metadata, like so:
title: Example title
date: 16-04-2015
slug: example-title
====
(existing file contents here)
  • Post -> Blok - sends the current post to Blok, where it is added to the posts folder as a markdown file. Then, when the site is built, the post will be included.

Todo

  • There is currently no built in mechanism for deployment. Since my iPad is jailbroken, I just made a symlink in /var/private/mobile to Pythonista's documents folder, and then from there I can copy things out. Maybe 'githubista' is a possibility for github pages?

blok's People

Contributors

solarfl4re avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

cclauss

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.