For Developers
Install
To embed the version information into binary (and produced files for reproducibility):
cd "$(mktemp -d)"
git clone https://github.com/ufukty/kask
cd kask
git fetch --tags --quiet
git checkout "$(git tag --list 'v*' | sort -Vr | head -n 1)"
make install
Make sure you have the make
, git
and go
commands accessible by your PATH
. Users don’t care about the version number stamping can as well use the go install
command directlty.
Folder structure
Kask creates a structure of sitemap which:
- Visitable directories ends with the directory name,
- Pages end with page name with file extension.
Visitable directories are the ones contain either of index.tmpl
or README.md
. Pages are always rendered with ending of .html
regardles the source file ends with .tmpl
or .md
.
Example
Let’s say this the folder structure for pages and directories you supplied to Kask:
.
└── acme
├── career
│ └── index.html
├── docs
│ ├── README.md
│ ├── birdseed.md
│ ├── download.md
│ └── magnet.md
├── index.html
└── products
└── index.html
Resulting sitemap will be like:
.
└── acme
├── career
│ └── index.html
├── docs
│ ├── index.html
│ ├── birdseed.html
│ ├── download.html
│ └── magnet.html
├── index.html
└── products
└── index.html
Although the .Node.Href
s will point to the directory-ending for visitable directories:
.
└── acme
├── career
├── docs
│ ├── birdseed.html
│ ├── download.html
│ └── magnet.html
└── products
So, a request to /acme/career
will make the server respond with content of /acme/career/index.html
, without redirections totally opaque to user agent. This resuls with lean sitemap with minimum number of items.
Make sure you check .Node.Href != ""
before printing them within anchor tags inside list items in printing your sitemap. Otherwise they are not visitable.