Giter Club home page Giter Club logo

website's Introduction

My Website

I wanted to host a blog to occasionally write about topics that interest me, and about experiences I've had. However, I don't have much need for static site generators outside of this use case, so it seemed redundant to learn Hugo or Jekyll, and I like to do things myself anyway. So I wrote a short Bash script (blog) as my own little static site generator. It has everything I'd want from it.

Usage

From ./blog -h:

Usage of this tiny static site generator: 
-n / --new         create a new post 
-b / --build     build the full site 

To elaborate on this, I took inspiration from Hugo, and used comments at the start of the file to give basic information about the pages to build. For example:

<!-- 
page_title: Title of a Blog Post 
page_description: This is the description of a blog post.  
page_status: published 
page_date: 2021/11/20 
-->

The minimum a post needs to be published is a page_status: published, and a page_date. A static page is definied by not having a page_date. For example, you can create an "about" page by haing a post called about.markdown and;

<!-- 
page_title: About Page
page_description: This is the description of the about page.
page_status: published 
-->

It creates a folder about with an index.html file in there with this content.

You can use page_head: to let the script know you want that page to generate with a large heading style (this simply changes what tag the bulk of the page is in).

Installation

This setup doesn't really have anything linking it to a particular domain. I really just want this to be very simple to use. It should be git clone'd into your website directory, and from there, run the script with ./blog (chmod +x if it's not executing).

If you have any questions please email me, [email protected].

website's People

Contributors

julianorchard avatar

Stargazers

Ahmed avatar

Watchers

 avatar

website's Issues

Sort out meta og:image and meta twitter:image

Two tasks for this really;

  • Create a default location, like /res/default.jpg which could be used as a default input for <meta name="twitter:image" and <meta property="og:image".
  • REMOVED THIS: Check if there's a jpg or png file in '/res/name-of-post/relating to each page, and if there is, use that as<meta name="twitter:imageand<meta property="og:image"`.

I'll also automatically create this location (/res/name-of-post/) upon the posts creation (automate populating that file location??)

Automate Build Process w/ GitHub Actions

Want to look into this as an option to automatically build the page, so you could theoretically just write a blog post in /content/, here on GitHub if you wanted to, and the site automatically builds... worth thinking about!

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.