Coder Social home page Coder Social logo

piaine's Introduction

PIAINE

Is é Piaine an cruthaitheoir suímh gríosain statacha .

piaine is a static site generator built on .net core.

SETUP

piaine/
|-- piaine.exe
|-- paine.dll
|-- output
|   |-- index.html - Site index - generated by piaine
|   |-- blog.css
|	|-- content/
|	|	|-- image.png - Site content held here.
|   `-- posts/
|       |-- post1.html - Generated posts from txt files
|       `-- post2.html
|-- posts/
|   |-- post1.txt - Text files that are source for the posts.
|   `-- post2.txt
|-- post.html - Post template
`-- index.html - Index template

Sample directory structure above. The template html files are customised for each site, and use the markup described below to insert the text from each individual posts.

MARKUP

Variables

{ !title } || { !date } || { !}

Variables in piaine templates are described within parentheses and identified with a ! character immediately preceding the variable. These variables are then mapped from the source content files where the content relating to a variable is defined following a colon ':'

Links

+/TheCrowKing/+ Here+ is a sample link.

The href is defined within the first + pair. Then the link text is the text before the closing + tag. Currently links only can be defined at the start of a paragraph. This should be an easy fix, but it is not implemented yet.

Subtitles

Subtitles are as done in markdown. # at the start of a line delimits that it should be a header or subtitle.

Images

|sampleimage.png| alt text |

Images in piaine are defined with the file name and the alt text. The file name should be local to the content folder in the base site folder as shown in the directory structure above. Moving of images to this content folder is currently manual.

Quote Blocks

{This is the quote body and next is the} attribution}

Quote blocks and attributions come as pairs. We wrap them as seen in braces.

Templates

Templates are an optional attribute that can be added in content files. If no template attribute is found, then the post template is used, otherwise, the specified template is loaded for that single file.

SAMPLE POST FILE

-title: Sample Post
-template: sampleTemplate.html
-body:
#Intro
Piaine is a simple .Net Core static website generator. Piaine is a personal project. Not really recommended for people to use. But it is simple, and it is fast.
Déanta in Éirinn, thar lear.

|testimage.png| sample image |

#Tech
Piaine is created using minimal .Net Core libraries and nothing outside of the standard libraries. As a result, it is lightweight, and also very opinionated.
#Links
So I have actually added link support to this.
+http://jpgleeson.com/+ Here+ is a link to my personal site, where I am dogfooding piaine.

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.