Among other things, here are some important directories and files at the root of the repo:
eleventy.config.jssrcpublic_data_config_includes
eleventy.config is kept at the root of the project. It is the main configuration file of an Eleventy project. It defines which directories are made public, which are used for input and output data.
The src directory at the root of the project is defined as the main input directory. All pages that are built are kept in it or in one of its subdirectories.
Nav-related:
src/index.njk: homepagesrc/about.njksrc/colophon.njksrc/now.njksrc/uses.njksrc/media.njksrc/posts.njksrc/blogroll.njk: paginates individual files insrc/blogrollas one final page (data collated through_data_/blogrollData.js)src/bookmarks.njk: paginates individual files insrc/bookmarksas one final page (data collated through_data_/bookmarkData.js)src/recipes.njk: paginates individual files insrc/bookmarksas one final page (data collated through_data_/recipeData.js)
Other special cases:
src/search.njk: fallback search page used if the user disabled Javascriptsrc/search-data.njk: template creating the search data JSON file
src/media: includes all media posts that are linked inclarale.com/media/src/posts: includes all blog posts that are linked inclarale.com/posts/src/recipes: includes all recipe posts that are linked inclarale.com/recipes/. The original files are in JSON. They are read by_data/recipeData.jsand paginated through thesrc/recipes/recipe-layout.njktemplate.src/bookmarksandsrc/blogrollcontain the individual post files that will be collated to create the "Bookmarks" and "Blogroll" pages
The public directory is published as-is and can be accessed from the client.
public/img: stores all imagespublic/styles: stores all CSS files
_data: stores global data files that we can access from anywhere in the project- The contained files
recipeData.js,blogrollData.js,bookmarkData.jsuse the same code
- The contained files
_config: stores custom-made filters and plugins used in the projectfunctions: stores functions that are used during the project build
The _includes directory stores everything that is template-related. It contains regular NJK files that can be injected in pages and templates. It also has two subdirectories of more specialized template-files:
layout: a layout is a template that wraps other content. This website uses two different layouts:_includes/layout/base.njk: The top level HTML structure that wraps all pages._includes/layout/post.njk: The post template (wrapped inside ofbase.njk). It is used for generic posts with apost-header.njkat the top, footnotes support and a comment section at the bottom.
macro: a macro is a snippet that can be injected in a page or template, its content can be defined when injecting it
For the media images:
vipsthumbnail -o ./output/%s.webp[Q=70,effort=6,strip=true] -s 500 -a --vips-progress *.jpg