Giter VIP home page Giter VIP logo

eleventy-starter's Introduction

A simple static site starter project.

Built using:


Prerequisites

Running locally

# install the project dependencies
npm install

# run the build and server locally
npm run start

# run the production build
npm run build

Updating Styles

Styles are located in /src/assets/css/style.scss all the included files use an _ at the start of the name and are referenced from the style.scss file.

Adding pages

Add a new page to the /src/site/ folder either to the root, or to a sub-folder that doesn't start with _ - make sure to add the frontmatter as per the Eleventy and EventyNavigation documentation e.g.

---
eleventyNavigation:
  key: Home
---

{% extends "layouts/one-column-sidenav.njk" %}

OOTB layouts

There are two layouts OOTB, one with a side navigation layouts/one-column-sidenav.njk, the other without layouts/one-column.njk.

Icon Map

Adding icons

Add icons to be used in the /src/assets/icons/svgs-src/ folder. Once added run:

npm run icons

The above command will optimise and save the icons into a single sprite sheet.

Use the icons

The custom NJK command {{ svg.render('ICON_FILENAME') }} will render the SVG asset into the page. Make sure to set the size of the icons using CSS or they'll likely be very large. Make sure to import the SVG component into the page at the top using {% import "utils/svg.njk" as svg %}

eleventy-starter's People

Contributors

dkeeghan avatar

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.