Options
Indiekit uses cosmiconfig to find and load a configuration file. Starting from the current working directory, it looks for the following possible sources:
- a
indiekit
property inpackage.json
- a
.indiekitrc
file - a
indiekit.config.js
file exporting a JavaScript object - a
indiekit.config.cjs
file exporting a JavaScript object (in projects that specify"type":"module"
inpackage.json
)
The search stops when one of these is found, and Indiekit uses that object. You can use the --config
CLI option to short-circuit the search.
The .indiekitrc
file (without extension) can be in JSON or YAML format. You can add a filename extension to help your text editor provide syntax checking and highlighting:
.indiekitrc.json
.indiekitrc.yaml
/.indiekitrc.yml
.indiekitrc.js
application
application.authorizationEndpoint URL
Indiekit uses its own authorization endpoint, but you can use a third-party service by setting a value for this option.
Optional, defaults to "[application.url]/auth"
. For example:
{
"application": {
"authorizationEndpoint": "https://indieauth.com/auth"
}
}
application.locale string
The language used in the application interface.
Optional, defaults to system language if supported, else "en"
(English). For example:
{
"application": {
"locale": "de"
}
}
See Localisation →
application.mediaEndpoint URL
Indiekit uses its own Micropub media endpoint, but you can use a third-party service by setting a value for this option.
Optional, defaults to "[application.url]/media"
. For example:
{
"application": {
"mediaEndpoint": "https://website.example/media"
}
}
application.micropubEndpoint URL
Indiekit uses its own Micropub endpoint, but you can use a third-party service by setting a value for this option.
Optional, defaults to "[application.url]/micropub"
. For example:
{
"application": {
"micropubEndpoint ": "https://website.example/micropub"
}
}
application.mongodbUrl URL
A MongoDB connection string. Used by features that require a database.
Optional, defaults to p
. For example:
{
"application": {
"mongodbUrl": "mongodb://mongodb0.example.com:27017"
}
}
WARNING
This value may contain private information such as a username and password. It’s recommended that you store this value in an environment (or configuration) variable which can only be seen by you and the application.
application.name string
The name of your server.
Optional, defaults to "Indiekit"
. For example:
{
"application": {
"name": "My IndieWeb Server"
}
}
application.themeColor string
Accent colour used in the application interface.
Optional, defaults to "#0055ee"
. For example:
{
"application": {
"themeColor": "#663399"
}
}
application.themeColorScheme string
Color scheme used in the application interface, "automatic"
, "light"
or "dark"
.
Optional, defaults to "automatic"
. For example:
{
"application": {
"themeColorScheme": "dark"
}
}
application.tokenEndpoint URL
Indiekit uses its own token endpoint, but you can use a third-party service by setting a value for this option.
Optional, defaults to "[application.url]/auth/token"
. For example:
{
"application": {
"tokenEndpoint": "https://tokens.indieauth.com/token"
}
}
application.ttl number
Length of time to cache external data requests (in seconds).
Optional, defaults to 604800
(7 days). For example:
{
"application": {
"ttl": 3600
}
}
application.url string
The URL of your server. Useful if Indiekit is running behind a reverse proxy.
Optional, defaults to the URL of your server (as provided by request headers). For example:
{
"application": {
"url": "https://server.website.example"
}
}
plugins
An array of plug-ins you wish to use with Indiekit. For example:
{
"plugins": [
"@indiekit/preset-jekyll",
"@indiekit/store-github",
"@indiekit/syndicator-mastodon",
"@indiekit/syndicator-twitter",
],
}
Each plug-in may accept its own configuration options, and these should be provided under a key with the plug-in’s name. For example:
{
"@indiekit/preset-hugo": {
"frontMatterFormat": "yaml"
}
}
WARNING
Plug-ins may include options that require private information such as passwords or API keys to be given. It’s recommended that you store these values in environment (or configuration) variables which can only be seen by you and the application.
Learn more about Indiekit’s plug-in API.
publication
publication.categories Array | URL
A list of categories or tags used on your website. Can be an array of values, or the location of a JSON file providing an array of values.
Optional.
Example, using an array:
{
"publication": {
"categories": ["sport", "technology", "travel"]
}
}
Example, using a URL:
{
"publication": {
"categories": "https://website.example/categories.json"
}
}
publication.enrichPostData boolean
Fetch and append data about URLs referenced in new posts.
Optional, defaults to false
. For example:
{
"publication": {
"enrichPostData": true
}
}
When enabled, Indiekit will try to fetch Microformats data for any URL in a new post (for example URLs for bookmark-of
, like-of
, repost-of
, in-reply-to
).
If any data is found, a references
property will be included in the resulting post data. For example, given the following Micropub request:
POST /micropub HTTP/1.1
Host: indiekit.mywebsite.com
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer XXXXXXX
h=entry
&content=This+made+me+very+hungry.
&bookmark-of=https://website.example/notes/123
should the note post at https://website.example/notes/123
include Microformats, the following post data would be generated:
{
date: "2022-11-03T22:00:00",
"bookmark-of": "https://website.example/notes/123",
content: "This made me very hungry.",
references: {
"https://website.example/notes/123": {
type: "entry",
published: "2013-03-07",
content: "I ate a cheese sandwich, which was nice.",
url: "https://website.example/notes/123"
}
}
}
This referenced Microformats data could then be used in the design of your website to provide extra information about the content you are linking to.
publication.locale string
Your publication’s locale. Currently used to format dates.
Optional, defaults to "en"
(English). For example:
{
"publication": {
"locale": "de"
}
}
publication.me URL
Your website’s URL.
Required. For example:
{
"publication": {
"me": "https://website.example"
}
}
publication.postTemplate Function
A post template is a function that takes post properties received and parsed by the Micropub endpoint and renders them in a given file format, for example, a Markdown file with YAML front matter.
Optional, defaults to MF2 JSON. For example:
// indiekit.config.cjs
import { myPostTemplate } from "./my-post-template.js";
export default {
publication: {
postTemplate: myPostTemplate,
},
};
INFO
This option is only available for configuration files that export a JavaScript object (for example, indiekit.config.js
or indiekit.config.cjs
).
See customising a post template →
publication.postTypes Array
A set of default paths and templates for different post types.
Optional if using a preset. For example:
"publication": {
"postTypes": [{
"type": "note",
"name": "Journal entry",
"post": {
"path": "_journal/{yyyy}-{MM}-{dd}-{slug}.md",
"url": "journal/{yyyy}/{MM}/{slug}"
}
}]
}
See customising post types →
publication.slugSeparator string
The character used to replace spaces when creating a slug.
Optional, defaults to "-"
(hyphen). For example:
{
"publication": {
"slugSeparator": "_"
}
}
publication.storeMessageTemplate Function
Function used to customise message format.
Optional, defaults to [action] [postType] [fileType]
. For example:
export default {
publication: {
storeMessageTemplate: (metaData) =>
`🤖 ${metaData.result} a ${metaData.postType} ${metaData.fileType}`,
},
};
INFO
This option is only available for configuration files that export a JavaScript object (for example, indiekit.config.js
or indiekit.config.cjs
).
See customising commit messages →
publication.timeZone string
The time zone for your publication. By default this is set to "UTC"
, however if you want to offset dates according to your time zone you can provide a time zone name. This option also accepts a number of other values.
Optional, defaults to "UTC"
. For example:
{
"publication": {
"timeZone": "Europe/Berlin"
}
}