Giter Club home page Giter Club logo

yetty's Introduction

yetty: Yet another Eleventy starter kit for my (& your) new projects. Built with accessibility and performance in mind.

Netlify-build GitHub-license GitHub-stars GitHub-forks

Yetty

Features:

TO-DO:

  • Improve documentation
  • Testing with Cypress

Demo

Deploy this to your own site

This builder is amazing. Try it out to get your own yetty site in a few clicks!

Requirements

Getting Started

1. Clone this Repository

git clone https://github.com/ygoex/yetty.git my-new-project

or, if you are currently signed in to GitHub, generate a repo from this template.

2. Navigate to the directory

cd my-new-project

Specifically have a look at .eleventy.js to see if you want to configure any Eleventy options differently.

3. Install dependencies

npm install

4. Edit _data/metadata.json and adjust the values to your details.

5. Run Eleventy

For local development:

npm start

To build a production version:

npm run build

For debug mode:

DEBUG=* npx eleventy

Implementation Notes

  • about/index.md shows how to add a new content page.
  • posts/ has the blog posts but really they can live in any directory. They need only the post tag to be added to this collection.
  • Add the nav tag to add a template to the top level site navigation. For example, this is in use on index.njk and about/index.md.
  • The blog post feed template is in feed/feed.njk. This is also a good example of using a global data files in that it uses _data/metadata.json.
  • This example uses three layouts:
    • _includes/layouts/base.njk: the top level HTML structure
    • _includes/layouts/home.njk: the home page template (wrapped into base.njk)
    • _includes/layouts/post.njk: the blog post template (wrapped into base.njk)
  • _includes/postlist.njk is a Nunjucks include and is a reusable component used to display a list of all the posts. index.njk has an example of how to use it.

Other features you might require:

  • Inline CSS: If you require further control over the above the fold & common style inlined by CriticalCSS, you can inline the style manually as follows:

    1. Add the following code between the head tags in the base.njk file:

      {% set css %}
        {% include "inline_style/inline_style.css" %}
      {% endset %}
      <style>
        {{css | cssmin | safe}}
      </style>
      
    2. Create a scss file with the name inline_style.scss under _includes/inline_style/scss/inline_style.scss

    3. Add the following command to the beginning of the sass:prod script in package.json:

      node-sass src/_includes/inline_style/scss/ --output src/_includes/inline_style/ --output-style compressed &&
      

      And also, the following command to the beginning of the sass:dev script:

      node-sass src/_includes/inline_style/scss/ --output src/_includes/inline_style/ --source-map true --source-map-contents true &&
      

    For additional documentation about how to inline css in Eleventy visit:

    1. https://www.11ty.dev/docs/quicktips/inline-css/
    2. https://www.11ty.dev/docs/quicktips/concatenate/
    3. https://danabyerly.com/articles/manually-splitting-css-files-in-eleventy/

This starter kit was born as a fork of eleventy-base-blog, but it also includes features inspired by other Eleventy projects:

yetty's People

Contributors

ygoex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

yetty's Issues

Single column and uncompressed image

Hi, thanks for the great work. I have two questions.

  1. How can I change the following two-column layout to a single-column?
    image

  2. It seems the quality of the image will be degraded after compiling, how can I avoid this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.