Move to use a content
folder instead of everything in root.
This commit is contained in:
parent
ea6acf2f6d
commit
216a9de439
@ -81,9 +81,9 @@ DEBUG=Eleventy* npx @11ty/eleventy
|
||||
|
||||
### Implementation Notes
|
||||
|
||||
- `about/index.md` is an example of a content page.
|
||||
- `blog/` has the blog posts but really they can live in any directory. They need only the `post` tag to be included in the blog posts [collection](https://www.11ty.dev/docs/collections/).
|
||||
- Use the `eleventyNavigation` key (via the [Eleventy Navigation plugin](https://www.11ty.dev/docs/plugins/navigation/)) in your front matter to add a template to the top level site navigation. This is in use on `index.njk` and `about/index.md`.
|
||||
- `content/about/index.md` is an example of a content page.
|
||||
- `content/blog/` has the blog posts but really they can live in any directory. They need only the `post` tag to be included in the blog posts [collection](https://www.11ty.dev/docs/collections/).
|
||||
- Use the `eleventyNavigation` key (via the [Eleventy Navigation plugin](https://www.11ty.dev/docs/plugins/navigation/)) in your front matter to add a template to the top level site navigation. This is in use on `content/index.njk` and `content/about/index.md`.
|
||||
- Content can be in _any template format_ (blog posts needn’t exclusively be markdown, for example). Configure your project’s supported templates in `eleventy.config.js` -> `templateFormats`.
|
||||
- The `public` folder in your input directory will be copied to the output folder (via `addPassthroughCopy` in the `eleventy.config.js` file). This means `./public/css/*` will live at `./_site/css/*` after your build completes.
|
||||
- The blog post feed template is in `feed/feed.njk`. This feed also uses the global data file at `_data/metadata.json`.
|
||||
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
@ -15,10 +15,6 @@ function relativeToInputPath(inputPath, relativeFilePath) {
|
||||
}
|
||||
|
||||
module.exports = function(eleventyConfig) {
|
||||
// Don’t process these files
|
||||
// https://www.11ty.dev/docs/ignores/#configuration-api
|
||||
eleventyConfig.ignores.add("README.md");
|
||||
|
||||
// Copy the contents of the `public` folder to the output folder
|
||||
// For example, `./public/css/` ends up in `_site/css/`
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
@ -30,7 +26,8 @@ module.exports = function(eleventyConfig) {
|
||||
// https://www.11ty.dev/docs/watch-serve/#add-your-own-watch-targets
|
||||
|
||||
// Process content images to the image pipeline.
|
||||
eleventyConfig.addWatchTarget("**/*.(png|jpeg)");
|
||||
eleventyConfig.addWatchTarget("content/**/*.{png,jpeg}");
|
||||
|
||||
|
||||
// Plugins
|
||||
eleventyConfig.addPlugin(pluginRss);
|
||||
@ -136,11 +133,11 @@ module.exports = function(eleventyConfig) {
|
||||
// Pre-process *.html files with: (default: `liquid`)
|
||||
htmlTemplateEngine: "njk",
|
||||
|
||||
// These are all optional (defaults are shown):
|
||||
// These are all optional:
|
||||
dir: {
|
||||
input: ".",
|
||||
includes: "_includes",
|
||||
data: "_data",
|
||||
input: "content", // default: "."
|
||||
includes: "../_includes", // default: "_includes"
|
||||
data: "../_data", // default: "_data"
|
||||
output: "_site"
|
||||
},
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
"serve": "npx @11ty/eleventy --serve",
|
||||
"start": "npx @11ty/eleventy --serve --quiet",
|
||||
"debug": "DEBUG=Eleventy* npx @11ty/eleventy",
|
||||
"debugstart": "DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet",
|
||||
"benchmark": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy"
|
||||
},
|
||||
"repository": {
|
||||
|
Loading…
Reference in New Issue
Block a user