Syntax Intro to index.md

The index page needs to be edited manually means writing from scratch.

Here's a sample demo page;


$ cat index.md

++++++++++++++++head
.title: A blog by samiuljoy
.author: samiuljoy
.description: A demo page on ssg + random blog
.style: css/imain.css
.name-generator: A personal space of samiuljoy
.canonical: https://samiuljoy.github.io/
--------------------head


++++++++++++++++++++++intro
.h2: samiuljoy.github.io
.h2: Random stuff
.img: ![rando image](assets/pens.png)
----------------------intro


++++++++++++++++++++navigation
.page: [demo](demo/base.html)
.page: [about](about.html)
.page: [blog](blog/base.html)
-------------------------navigation


+++++++++++++++++++footer
.message: <!>
--------------------footer


+++++++++++++++++++++script
.script: js/itoggle.js
---------------------script



view raw

# Head section

The ++head and --head section is the <head></head> tags.

.title -> is the title tag <title>

.author -> Your name

.description -> something to describe about the page

.style -> the index css. You can change it if you like.

.name-generator -> whatever you want to best describe the index page

.canonical -> the link to your site, in my case I would type in https://samiuljoy.github.io

# Intro section

Intro section ++intro --intro is what get's displayed on the screen.

.h2 -> heading 2 texts

.img: ![image alt](assets/image.png) -> is what gets displayed at the image section. The image section is mostly in markdown syntax.

# Navigation section

These are the navigation pages. The words in square [square] brackets is what gets displayed and (dirname/base.html) is the link to the base.html file. Remember to only include base.html pages when mentioning directories.

Bounded by ++navigation and --navigation and each page section starts with .page: followed by the display name and url

# Footer section

Bounded by ++footer and --footer the .message: part is what get's displayed on the footer part

# Script section

This little script portion is for dark/light mode toggle. If you click the image, the page will be in dark mode and clicking again puts it in light mode. You can also add custom scripts the same way.

This is what it should look like;

# Generating index.md page

For generating index.md pages from the shell you'd do


$ sh main.sh index index.md

This will generate a index.html


Made with <3 by samiuljoy

rss | about | go to top