Giter Site home page Giter Site logo

pyblue-central's Introduction

Welcome to PyBlue

A simple static site generator developed many eons ago (2013) when writing static site generators was still cool. (As of 2022 some features are still better than all the alternatives)

Why another one static generator?

There are so many static site generators already.

Alas I found most options to be way too complicated.

Each has many conventions and rules: you have to put this here, you have to put that there, many naming convention. It was too tiring to keep up.

Then as I was developing courses over the years I found that I could not easily reorganize the site, the links would all break when I moved files around. Very annoying.

Finally when I wanted to do something complicated like running a piece of code while generating the site the tools could not do it.

At some point I realized that I'll just have to roll my own, and I did, and here it is.

PyBlue is different. Everything is optional, nothing is required, use only what you need. It basically stays out of the way.

Simple things are very easy:

  • No configuration required.
  • Works with any existing site.
  • Easy to include markdown.
  • Easy linking to other pages.
  • Tiny codebase, pyblue is around 500 lines in a single file!

Complicated tasks are easy:

  • PyBlue generates the correct links even if you move pages around.
  • Use Django Templates and all the features that it offers.
  • Easily add data into each page (title, link name, or any arbitrary content).

And you can go all the way out if you really want to:

  • Load python modules into each page.
  • Exposed data: database queries, results of online requests etc.
  • Run python code, access and modify data from inside of each page.
  • Extend the Django templates. Add your own templatetags.

Documentation

You can also browse the help in source format for examples.

Install

pip install pyblue --upgrade

Or download it from the PyBlue at PyPI.

Usage

Launch pyblue to serve a directory

pyblue -r docs

View your site by visiting http:://localhost:8080

Edit your pages and make changes. Reload the page to see your edits live. Generate static output with:

pyblue -r docs -o html

That's all. Told you it was simple. To see extra help on options run:

pyblue -h

Licensing

pyblue-central's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

pyblue-central's Issues

Automatically render markdown

It would be interesting to have markdown redered automatically instead of only rely on HTML (I'm not a HTML person.. and I just realized how easy is to create pages in markdown!). Thanks!

Diego Mazzotti

os 10.10.3 trouble

after installing with pip:

$ pyblue Traceback (most recent call last): File "/usr/local/bin/pyblue", line 2, in <module> from pyblue import pyblue File "/Library/Python/2.7/site-packages/pyblue/pyblue.py", line 8, in <module> from django.template import Context, Template, get_templatetags_modules ImportError: cannot import name get_templatetags_modules antons-macbook-air:galaxy anton$ pyblue Traceback (most recent call last): File "/usr/local/bin/pyblue", line 2, in <module> from pyblue import pyblue File "/Library/Python/2.7/site-packages/pyblue/pyblue.py", line 8, in <module> from django.template import Context, Template, get_templatetags_modules ImportError: cannot import name get_templatetags_modules

Diificulty switching from 1 to 2

Trying to serve an old site written for pyblue 1.2 getting this:

WARNING pyblue.__init__ unable to import context module: context.py

What are the steps for switching to pyblue 2 for sites maintained with pyblue 1.2?

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.