Kriti follows a sane and defined blog structure. Everything revolves around the kriti.blog
file. The location of this file dictates where the markdown and other related files are.
Ideal Structure
Where ever you decide to place your new blog content while running kriti new blog
, it should have following files and folder bare minimum
sample-blog/
|-- kriti.blog
|-- content/
|---- blog1/
|------ index.md
|------ cover.png
|-- static/
|---- favicon.ico
The best approach would be to keep all the files and folders in one parent folder. In above example everything is kept under the folder
sample-blog
.
The kriti.blog
file
This file indicates root location of the blog contents. Kriti will look for other content relative to this file. The folders content
& static
should be present where ever this file is kept.
The content
folder
content
contains all the blogs to be published. Every blog must be in its own folder. Example
| ...
|-- content/
|-- blog1/
|-- index.md
|-- cover.png
|-- parent1/
|-- child1/
|-- index.md
|-- cover.png
|-- child2/
|-- index.md
|-- cover.png
This structure also dictates the URL for every blog. For example blog1
will be published as example.kriti.blog/blog1
and child2
as example.kriti.blog/parent1/child2
.
All the assets that blog1
requires are under blog1
folder same goes for child1
and child2
. parent1
on the other hand is not a blog just a collection of blogs.
The static
folder
static
should contain all files which are to be hosted statically & favicons. These are not blogs just random files. These can be images, pdfs, text files, GIFs whatever you want.
| ...
|-- static/
|-- favicon-16x16.png
|-- favicon-32x32.png
|-- apple-touch-icon.png
|-- android-chrome-192x192.png
|-- android-chrome-512x512.png
|-- some-random/
|-- image.jpeg
|-- pdfs
|-- example.pdf
In above structure, image.jpeg
would be available at example.kriti.blog/some-random/image.jpeg
same goes for example.pdf
at example.kriti.blog/pdfs/example.pdf
.
Favicons
These are Good To Have files for every website. They would be available at
- favicon-16x16.png:
example.kriti.blog/favicon-16x16.png
- favicon-32x32.png:
example.kriti.blog/favicon-32x32.png
- apple-touch-icon.png:
example.kriti.blog/apple-touch-icon.png
- android-chrome-192x192.png:
example.kriti.blog/android-chrome-192x192.png
- android-chrome-512x512.png:
example.kriti.blog/android-chrome-512x512.png
Clients browsers will request these files to show as a blog icon.