usage
Usage: cliche [OPTIONS] <CONTENT>
Arguments:
<CONTENT> Directory containing the site's content
Options:
--header <HEADER> Path to the site's header [default: header.md]
--footer <FOOTER> Path to the site's footer [default: footer.md]
--style <STYLE> Path to the site's stylesheet [default: style.css]
-o, --output <OUTPUT> Site output directory. Will be created if it doesn't already exist [default: _site]
--domain <DOMAIN> The domain of the site, used for generating full URLs in the sitemap. If not provided, a sitemap will not be generated
--base-url <BASE_URL> A base url that the site will be served from
-h, --help Print help
-V, --version Print version
Details
Add a header file (optional)
<!-- header.md -->
# my awesome website
<nav>
[home](contents/index.md)
[about](contents/about.md)
[whatever](contents/a/secret/path/whatever.md)
</nav>
Add a footer file (optional)
<!-- footer.md -->
[Contact](fake@gmail.com) | [Github](https://github.com/gdtroszak/cliche)
Add some content
Create a directory for your content and add some files to it. Hereβs an example that shows the URL paths to each page.
.
βββ content/
βββ index.md /
βββ static/
β βββ image.jpg /static/image.jpg
βββ food/
β βββ index.md /food
β βββ coffee.md /food/coffee.html
β βββ bread/
β βββ sourdough.md /food/bread/sourdough.html
β βββ wheat.md /food/bread/wheat.html
βββ bikes/
βββ gravel.md /bikes/gravel.html
Maybe Iβd want my homepage to link to a few other pages.
<!-- content/index.md -->
---
title: my amazing website
meta_description: a website about me and all the things I like.
---
- [food](./food/index.md)
- [gravel biking](content/bikes/gravel.md)
A few things to note here:
- You can optionally add a title and meta_description in front-matter. This
will be used in the
meta
tags for the page. - Links to other content can either be relative to the file itself or the root of your project. Use a text editor with a Markdown LSP. Itβll make this really easy.
Add some style (optional)
/*style.css */
html {
...
}
body {
...
}
Iβd recommend that you just copy one of the many classless options available.
You can add classes by throwing a bunch of HTML all over your Markdown, but that probably wonβt end well.
Run it
cliche ./content
Your site should get spit out to a _site
directory. If you took advantage
of using index.md
βs to generate more canonical URL paths, youβll need to serve
the site. Something like simple-http-server
is perfect for that.
simple-http-server -i --nocache ./_site