Code Monkey home page Code Monkey logo

nunjucks-starter's Introduction

Nunjucks Starter

To begin you'll need NodeJS or Yarn.

npm install or yarn install

This starter use gulp for it's pipeline and have this features:

  • SCSS to CSS files from src/scss
  • SVG Sprite by combining all files in src/icons/*.svg
  • Optimizing images in src/img and copy them in the dist folder
  • Compile JS files in src/js with @babel/env
  • Live reload all the things with BrowserSync ๐Ÿš€

Development

To start the development server, you need to run the watch script.

npm run watch or yarn watch

Then go to http://localhost:1234/index.html

Production

To build HTML and CSS files :

npm run build or yarn build

Fonctionnement

This starter use Nunjucks for it's templating engine. To create a page, you have to create a file in the src/pages folder with the name of your page. For example src/pages/my-page.njk. This will generate a file called my-page.html and you'll be able to access it in your browser.

Nunjucks page example:

{% extends "../layouts/home.njk" %}

{% block content %}
    <h1>Page 1</h1>
{% endblock %}

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.