GithubHelp home page GithubHelp logo

gyptazy / manpageblog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sunainapai/makesite

40.0 2.0 3.0 78 KB

manpageblog is a small, lightweight blog engine written in Python and offers several advantages in a look of a man page (Unix like manual page).

Home Page: https://manpageblog.org

License: Other

Python 48.89% CSS 7.92% HTML 40.34% Dockerfile 2.85%
blog blogengine blogging html manpage python sitegenerator static website

manpageblog's Introduction

manpageblog


Table of Content

General

manpageblog is a small, lightweight blog engine written in Python and offers several advantages in a look of a man page (Unix like manual page). Firstly, it provides simplicity and ease of use, making it accessible even for users with limited technical knowledge. The lightweight nature ensures quick installation and minimal resource consumption, making it suitable for various hosting environments. No database is needed at all.

Python's readability and straightforward syntax make the blog engine easy to customize and extend, allowing users to tailor it to their specific needs. Additionally, being Python-based means leveraging a vast ecosystem of libraries and frameworks, enhancing the blog's functionality without unnecessary complexity. Posts and pages are written in Markdown or HTML while the blog engine generates the whole website. While using only flat files, this offers great possibilities in maintaining the content. Given this approach, you can manage your whole blog in git.

The lightweight nature also contributes to faster loading times, improving user experience and search engine rankings. Overall, a small, lightweight blog engine in Python combines simplicity, flexibility, and efficiency, making it an ideal choice for those prioritizing a streamlined and customizable blogging experience.

To support this small and lightweight expression of the blog engine the default theme represents a man page (manual page or also known as handbook) design which provides all needed information in a simple document.

Usage

manpageblog is a pretty easy, slim and straight forward tool. After checking out this repository it is enough to simply run the following command:

$> ./manpageblog

This command directly creates an example blog within the subdirectory docroot by the given example content from content.

Adding and modifying content is only done within the content directory. This approach makes it easy to obtain the content for the blog from a git repository. All content is provided by flat files like .md (Markdown) and/or .html.

Options

manpageblog supports the following options:

Option Example Description
-c -c gyptazy.conf Defines a config file for a specific blog
-h --help Prints the help page

By creating multiple config files and adjusting them to dedicated output directories (and if needed templates & assets), this provides a multi blog setup.

Config File

The configuration file (default blog.conf) provides the following configuration files. You may adjust them to your personal needs:

[general]

Option Example Description
name manpageblog Defines the first part of the title (and HTML title)
subtitle a small and lightweight blog engine. Defines the second part of the title (and HTML title)
description This is the blog of manpageblog where you can find more information Defines the HTML meta descriptions (for searchengines)
keywords manpageblog, simple, easy, lightweight, blog engine Keywords and tags as a comma separated list
keywords_show meta or html Meta: Keywords will only be used for meta section. If html a tag section will be created
robots noindex,nofollow or index,follow Defines if a page should be indexed by search engines (can be set for each site)
author admin A default name for the author of blog posts
copyright manpageblog name of a copyright holder
preview_words 150 (default) How many words should be displayed within the blog index page
logo_site https://cdn.gyptazy.ch/images/manpageblog.jpg URL to a default site logo (e.g. used for RSS)
logo_favicon https://cdn.gyptazy.ch/images/manpageblog.jpg URL to a favicon image
logo_apple_touch https://cdn.gyptazy.ch/images/manpageblog.jpg URL to an image for Apple Touch Icon (Webapp)

[social]

Option Example Description
mastodon https://mastodon.bsd.cafe/@manpageblog Link to Mastodon profile
twitter @manpageblog Twitter profile handle
github https://github.com/manpageblog Link to GitHub profile

[opengraph]

Option Example Description
image_width 800 Image width within the OG preview
image_height 375 Image height within the OG preview

[processing]

Option Example Description
site_url http://localhost:8000 URI (site url) where this blog is hosted
base_path None Path to the blog (subdirectory, if not in docroot)
assets_path _assets Path to the manpageblog assets
template_path _templates Path to the manpageblog assets
output_path docroot Output path to the generated blog
theme light Defines the theme to use

Blog entries (elements)

Within each website element or blog post, a custom title, meta description and an Open Graph image URL can be defined. This ones should be defined as comments which will re replaced and integrate during the site creation by the blog engine.

Example Post

<!-- title: manpageblog released in version 1.0 -->
<!-- meta_description: Initial release of manpageblog 1.0. A simple and static blog generator in manpage design written in Python. -->
<!-- image_url: https://cdn.gyptazy.ch/manpageblog.jpg -->

manpageblog finally got its first release. With version 1.0 a public release is now present.
A small, lightweight blog engine written in Python and offers several advantages in a look
of a man page (Unix like manual page).

Element Options

Option Example Description
title: manpageblog released in version 1.0 HTML & OG title
meta_description: Initial release of manpageblog 1.0. A simple and static blog generator in manpage design written in Python. HTML & OG description
image_url: https://cdn.gyptazy.ch/manpageblog.jpg Path to an image file for Open Graph

Quick-Start

To give this just a short test you can just run the following commands:

git clone https://github.com/gyptazy/manpageblog.git
cd manpageblog
./manpageblog
cd docroot
python3 -m http.server

Afterwards, just open your browser and visit http://localhost:8000. That's it!

Docker

Another possibility to test manpageblog is given by container images. Where you can just rebuild the image by the given Dockerfile or by using a ready to use image.

The fastest way results in using the ready to use image with the following commands:

docker pull cnt-reg.gyptazy.ch/gyptazy/manpageblog:1.2
docker run -d --name manpageblog12 -p 8080:80 cnt-reg.gyptazy.ch/gyptazy/manpageblog:1.2

# Use service on port tcp/8080
curl localhost:8080

Screenshots

Light Theme

Dark Theme

Live Demo

A live demo of a running manpageblog instance can be found here:
https://manpageblog.org

Instances

If you are using manpageblog you may add your website, blog or site here to share the usage and experience with other users. Of course, only if you like.

Instances:

Website User Description
https://manpageblog.org @gyptazy manpageblog project website
https://gyptazy.ch @gyptazy DevOps, coding, cloud and open-source in a geeky way. Find out more about Ansible, Kubernetes, Prometheus and other fancy tools. You see code - I see bugs!
https://boxybsd.com BoxyBSD BoxyBSD is a destination for free BSD-focused solutions and services for the community.

Motivation

Like probably the most ones I started with Wordpress which is a pretty cool but also a very bloated software for a personal blog. Running such a software requires multiple application with different dependencies, continuous updates and more resources on the system to serve the whole content. Creating additional backups of the docroot and the database require additional time and efforts. All of this is not really necessary when the content is more or less static and comments are deactivated or not used. A flat file approach provides the optional possibility to run and keep everything in git. Generated HTML pages can easily be served even on low resource systems. While this way of blogging mostly targets tech-enthusiasts that are already working on Unix-like systems the idea was to provide a blog engine in a layout and theming of a Unix-like man page (manual page). Man pages always align to the same formatting based on troff which make man pages look always the same. While man pages provide information of a cli command the idea was to adapt this to a blog. A blog also provides information and especially when serving tech related content it makes much sense to provide it in a similar way. This is the story of how manpageblog was born.

License

manpageblog This is free and open source software. You can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of it, under the terms of the MIT License.

This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, express or implied. See the MIT License for details.

This repository contains the source code of an example website containing two static blogs and a few static pages. The website can be generated by running manpageblog. That's it!

So go ahead, fork this repository, replace the content with your own, and generate your static website. It's that simple!

You are free to copy, use, and modify this project for your blog or website, so go ahead and fork this repository and make it your own project. Change the layout if you wish to, improve the stylesheet to suit your taste, enhance manpageblog if you need to, and develop your website/blog just the way you want it.

manpageblog's People

Contributors

gyptazy avatar sunainapai avatar mholiv avatar nortyspock avatar iefdev avatar gabfl avatar kgaughan avatar p10q avatar plaiddroid avatar

Stargazers

Akshara Hegde avatar  avatar Ferenc Erki avatar Matteo Bigoi avatar Jan-Piet Mens avatar Chubak Bidpaa avatar Pratham Patel avatar Airpods69 avatar Vera Rei avatar Yüce Tekol avatar Ricardson (r1w1s1) avatar  avatar Josh Austin avatar José Carlos García avatar  avatar  avatar extrowerk avatar  avatar  avatar Dude avatar Mark Pitblado avatar Ворон avatar  avatar  avatar Rolf avatar Rafal Kruk avatar Utkarsh( उत्कर्ष ) avatar C H A L K avatar Mehmet Akif Eren avatar A.s. avatar Williams Abraham avatar Esteban Saiz avatar Stephan Lichtenauer avatar David Sterry avatar  avatar  avatar Peter Kotrčka avatar jhx avatar  avatar Clay Ayers avatar

Watchers

 avatar Stephan Lichtenauer avatar

manpageblog's Issues

`Feature`: favicon should be dynamically set

General

Currently, the favicon is called from a static source within the root directory. It might make sense to have a dynamic path for this which also allows hosting images on different sources like a CDN.

`Feature`: Add robots support

General

A feature regarding meta robots support should be integrated to give users the possibility to define a robot option for each website. There might be cases where subsites or pages should not be indexed (e.g. imprint, data policy,...).

Support for retro browsers

Hi,

this strikes me as a perfect tool to generate html for really old browsers. Think frameless, css-less and generally wonky ones. HTML 3, at best.

Would this be feasible?

/Eirik

`Feature`: Add keyword/tag support

General

manpageblog should also support HTML meta keywords which could also be used as tags. This should be set for each site independently to have a better SEO rating.

`Feature`: Include link tag for RSS Feed

General

Thanks for Wojtek for mentioning me in the Fediverse, that manpageblog should also include a link tag for application/rss. This may be needed to indicate that the website is able to deliver RSS feeds. This may also be important to give users a possibility to catch the feed url since there isn't any visible hint for.

Task

  • Add the link tag according to the used domain to the header <link rel="alternate" type="application/rss+xml" title="RSS Feed for $URL" href="/rss/" />

`Feature`: Add Twitter:card support

General

While manpageblog already supports the OpenGraph (OG), it should also support Twitter cards for a proper sharing on Twitter/X.

Tasks

  • Integrate Twitter Card support

Validate for mandatory options

General

Not every option within the config file is mandatory. Therefore, manpageblog should check for mandatory options and throw an exception and also ignore missing optional options.

`Feature`: Add Open Graph support

General

manpageblog should also support Open Graph for a better sharing experience on social media platforms like Twitter, Facebook and Mastodon (Fediverse).

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.