Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Starter-Kit for 11ty

This starter-template has little to no styling - on purpose. It assembles some clever solutions and basic structuring of an eleventy-site. It is a starter point with working Sass transforamtion and many more. But styling, structure and templating is individually. So this project stops before getting too much sold into designing.

The standard-language of the templates is set on German. Please change it in the data-file "metadata.json", when necessary.

The structure of the project was chosen after watching a talk by Jérôme Coupé, He wrote is thoughts down in a short and (in my view) important article: Structuring Eleventy projects

Some solutions like the shortcodes and some filters were taken from the great starter project eleventy excellent by Lene Saile.

The variables in the frontmatter (or *.json)

  • layout defines the used layout-file.
  • title will become the page title and the content of h1
  • subline will become the subline (optional)
  • permalink will overwrite the usual filename. This is an eleventy-variable.
  • bodyClass will become the class of the body-element
  • eleventyNavigation has a least one attribute: key which sorts the page to a navigation category. A second possible option is order. More about the navigation-plugin can be found in the documentation.

Markdown-It

The extension markdown-it-attrs makes it possible to add attributes (classes, data-attributes, id ...) to elements in a markdown file.

input:

# This is a title {.c-article-section__title}
This is a paragraph with data-state {data-state=important}

Another text with attributes {.c-article-section__disclaimer #articleId attr=value attr2="spaced value"}

![Alt text](image.jpg){.u-shadow}

[Link in a new tab](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a){target="_blank" rel="noopener"}

output:

<h1 class="c-article-section__title">This is a title</h1>
<p data-state=important>This is a paragraph with data-state</p>
<p class="c-article-section__disclaimer" id="articleId" attr=value attr2="spaced value">Another text with attributes</p>

<img class="u-shadow" src="image.jpg" alt="Alt text">
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a" target="_blank" rel="noopener">Link in a new tab</a>

Helpful 11ty-links

11ty introductions

About

My starter project for eleventy. It serves SCSS-files, has a small gulp-file.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages