Code Monkey home page Code Monkey logo

chronosite's Introduction

Simple static site powering Syncroplicity.com.

Static HTML is produced using a short custom website generator powered by Flask, Jinja2, & wget.

All metadata is stored in content.json.
Templates are in: templates/
Static files are in: static/

Install

brew install wget python3  # only needed on mac
pip3 install flask

Common Tasks

Adding a new Page

  1. edit 'content.json' to add metadata for new page, including url
  2. add new template html file to templates/
  3. add link to new page in navbar: see base.html <nav> section
  4. rebuild site
  5. new page should appear in navbar

Editing existing Post/Page

  1. edit 'content.json' to reflect new metadata
  2. edit any relevant templates
  3. rebuild site
  4. new page should appear in navbar

Editing header/footer/other code

  1. edit base.html, static/main.css, content.json and any other relevant templates
  2. rebuild site
  3. new changes should appear on site

Command Line Interface

Run the Server

./server
# or with auto-reloading
env FLASK_DEBUG=True ./server

Get a list of the page & post urls without running the server

./server --pages
./server --posts

Build the Static Site

./build

Static HTMML output will be produced in output/, and can be rsyned to a server using build script or manually with:

rsync -r output/ chronosite:/opt/drchromopage/chronosite/output

Stack

The static site generator is build using Flask + Jinja2 and wget to save the output as static html.

chronosite's People

Contributors

caroguza avatar

Watchers

 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.