To install sakin use npm install -g sakin
.
Then sakin --init
will create a new working directory (website). This contains:
contents
articles
contains all the website posts. By default the homepage displays these articles.pages
contains all pages.output
static
contains the website's assetstemplates
includes
after_footer.html
footer.html
head.html
header.html
navigation.html
article.html
base.html
category.html
index.html
page.html
.sakin
defines a sakin website and contains metadatasettings.json
settings.json
contains all the global settings for the website. Here is the default settings file:
{
"url": "http://example.com",
"root_url": "/",
"author": "Change me",
"author_page": "http://change-me.com",
"title": "My awesome blog",
"subtitle": "Powered by sakin",
"description": "An amazing blog",
"page_size": 10,
"smart_generation": true,
"custom_index": false,
"style": {
"header_background": "#336B59"
},
"menu": {
"Blog": "index",
"Example": "contents/pages/example.md"
},
"disqus": {
"enabled": false,
"short_name": "",
"comment_count": false
},
"social": {
"twitter": true,
"facebook": true,
"twitter_page": "#",
"facebook_page": "#",
"github_page": "#"
},
"tracking": {
"enabled": false,
"google_id": ""
},
"publish": {
"medium": "github",
"github": {
"repo": "",
"project": false
},
"rsync": {
"user": "",
"server": "",
"location": ""
}
}
}
author_page
: the author websitepage_size
: pagination size for articles/posts displayed in the homepagesmart_generation
: enables/disables smart generationcustom_index
: if enabled uses a custom homepage created using the command: sakin --index
menu
: is a mapping of menu items to locationsdisqus
: defines disqus comment system settingssocial
: the boolean settings indicate the buttons to share articlestracking
: defines the Google Analytics settingspublish
: defines the medium with which you want to deploy your website using sakin --publish
sakin --article "Article name here"
creates an article with Article name here as a title. The created article is saved
in the articles
directory with the name article-name-here.md
(i.e. slugified).
The file will be structured as follows:
---
title: Article name here
subtitle: An awesome article
author: Change me
author_page: http://change-me.com
categories: examples, tests
date: 2016-04-10
description: Enter description
---
After the metadata you can write the content using Markdown.
If custom_index
is set to false then the article will appear in the homepage.
sakin --page "Page name here"
create a page with Page name here as a title. The created page is saved
in the pages
directory with the name page-name-here.md
.
The file will be structured as follows:
---
title: Page name here
subtitle: An awesome page
description: Enter description
---
N.B. If the page is named index
and custom_index
is set to true then this will be the homepage.
Content generation is the process of taking the markdown content, injecting it in the templates and creating additional pages (such as categories).
To generate use: sakin --generate
. If the global setting smart_generation
(SG) is set to true then only the modified content items are generated.
You can override this behaviour by using the appropriate option: sakin --generate --off-smart
(in this case turns SG off).
To preview your website use: sakin --serve
. This will create a local server using the port 8000.
To use another port just supply it in the command as in: sakin --serve 8080
.
Once you have finished writing you can manually upload the website from the output directory (FTP etc...).
If you are using GitHub Pages or rsync use the appropriate setting in settings.json
.
Currently sakin support only the default theme.