C. A. Imhoff is an Eleventy theme named after the second district superintendent for the Pittsburgh District Church of the Nazarene, who served from 1909 to 1912.
This theme is designed as a Git submodule for https://pghnaz.org/ and its subdomain sites to serve as 11ty’s includes directory.
If C. A. Imhoff is not already loaded as a submodule, then you can install it with the following command.
$ git submodule add https://github.com/pghnaz/caimhoff.git ELEVENTY_INCLUDES_DIRECTORY
If you are unfamiliar with Git submodules (and even if you are familiar), Chris Wanstrath has is a helpful article in Git documentation.
With the submodule loaded, then you can require the caimhoff
module and pass it the 11ty config argument.
NB, you’ll also need to specify a layouts directory in 11ty’s configuration options. This can be any directory inside the input directory, as long as it is at the same level as your includes directory. This allows you to define custom layouts outside the theme files.
// .eleventy.js
// Require theme modules, assuming your 11ty includes directory is src/includes/
var caimhoff = require('./src/includes/caimhoff')
module.exports = function (eleventyConfig) {
// Pass 11ty config argument to theme modules
caimhoff(eleventyConfig)
// 11ty directory options
return {
dir {
layouts: 'layouts' // any directory inside 11ty’s input directory
}
}
}
Before submitting an issue or pull request, please read our code of conduct.
Also, check out our main site wiki for style guides and coding standards.
Thanks for helping make this site possible.
Copyright © 2019 by Pittsburgh District Church of the Nazarene