Coder Social home page Coder Social logo

strogo / nicolas.perriault.net Goto Github PK

View Code? Open in Web Editor NEW

This project forked from n1k0/nicolas.perriault.net

0.0 3.0 0.0 30.58 MB

My personal static blog generator powered by Flask & Frozen-Flask

Home Page: https://nicolas.perriault.net/code/2012/dead-easy-yet-powerful-static-website-generator-with-flask/

nicolas.perriault.net's Introduction

My blog

This is the whole code and contents of my personal weblog, open sourced.

Basically it's a static website builder/generator based on Python, Flask, Frozen-Flask and cool other bricks.

Read more about the technical concepts behind the code.

Installation

Note: you need a working installation of Python and pip.

$ git co https://github.com/n1k0/nicolas.perriault.net.git
$ cd nicolas.perriault.net
$ virtualenv --no-site-packages `pwd`/env
$ source env/bin/activate
(env)$ pip install -r requirements.txt

Deploying

Don't deploy this as is. It's my personal weblog, remember? The code has been opensourced for educational purpose only.

Also, see the License section of this document for more information about contents copyright.

Usage

The site exec at the root of the repository is the only command you'll need to call to make this whole crap work:

To serve the website locally (optionaly in DEBUG=True mode):

$ ./site serve --debug
* Running on http://127.0.0.1:5000/
* Restarting with reloader

This is useful when you want to see changes without having to rebuild the whole suite.

To build the static website:

$ ./site build

Generated HTML files and assets will go to the ./build/ directory.

To deploy the website (caveat: my server address is harcoded ^^):

$ ./site deploy

There's also two commands for creating new posts and add new photos:

$ ./site post code --title="My title"
Created /Users/niko/Sites/nperriault/pages/code/2012/my-title.md
$ cat pages/code/2012/my-title.md
title: My title
date: 2012-10-05
published: false

Same for the ./site photo command.

License

Contents in ./pages and ./static/photography (blog posts and photos) are licensed under the terms of the Creative Commons BY-NC-SA license.

All the rest including Python code, templates, CSS & javascript is released under the terms of the Do What The Fuck You Want To Public License.

Important note: You can freely reuse parts of the project code, but you can't republish the blog with its contents as is publicly on the Interwebs.

Supplementary Caveats

  • It's up to you not being a dick with all of this, but I'm confident with that.
  • This code won't especially be maintained for other purpose than my own needs.

nicolas.perriault.net's People

Contributors

n1k0 avatar pborreli avatar

Watchers

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