A dynamic-content blog platform
Justin Cassidy, March 2018
Constantina is a single-page static site generator designed to randomize content for grazing. It's written in Python, and was originally written to host my music and technology site, Codaworry.
- 0.6.0 - Migrated to Python 3 for better performance and pervasive Unicode support
- 0.5.6 - Separated out security-oriented configuration for file monitoring purposes
- 0.5.5 - Forum settings forms and cookies,
- 0.5.3 - For
privatefiles, added caching headers and fixed paths with spaces
- 0.5.2 - Move images to
private, make search non-AJAX to better support auth checks
- 0.5.0 - Install from
setup.py, authentication features test-released
- 0.4.5 - Under-the-hood "sub-application" support, fixed search index generation
- 0.4.0 - First public release
- Single-page single-column infinite-scroll layout
- Layout responsive for any screen size or orientation
- Infinite scroll falls back to a "click to load" for legacy browsers
- Page consists of a series of cards
- Card content is either short HTML snippets, or raw images/music files
- Add content to a folder, and it will publish upon the next page load
- News cards contain Permalinks for external linking
- Future-dated news only publish after their timestamp
- Page layout and card types are easily configurable
- Search feature for cards with text emphasis
whooshtext-search library on the backend
- Unindexed text cards get indexed any time content is searched
- Supports keyword searches as well as "#cardtype" searches
- Supports ''encyclopedia'' cards that only appear in search results
- Six colorful themes, and straightforward HTML/CSS to make new ones
How It Works
Roughly 20 cards are displayed upon initial load, and Constantina considers this a ''page'' of content. No additional cards are loaded until the reader scrolls further in the viewport, or submits a search in the search bar.
Each card presents content stored in one of Constantina's content folders. Each content folder has a file naming convention and specific rules for how the content appears in the Constantina layout.
News items always have unix-timestamp names, and appear in reverse-time order, newest to oldest. Pictures and interjections are randomly-distributed through the pages, with guaranteed spacing. Songs and advertisements appear once per ''page'', randomly distributed. Finally, there are a handful of special cards, such as headers, footers, and tombstones that assist or alert about any pagination activities or page state.
Usage and Lifecycle
Constantina is licensed under the GNU Affero General Public License. I've been using it for three years, and if you decide to use it, I'd love your help in making it better.
Constantina is a Python web application, and running it requires solid knowledge
of Unix tools (
uwsgi). If you have basic footing in these
technologies, try setting up an instance yourself!
While this is currently a blog engine, I intend Constantina to be a platform for small online communities. Eventually I'll implement authentication and then sub-applictions, including a web forum, a basic CalDAV calendar, and an IMAP webmail client. Version 0.4.5 introduces some of these semantics:
- The Constantina blog features are called Medusa
- Web forum features in development are called Zoo
- Eventual IMAP client features will be called Dracula