Giter Club home page Giter Club logo

hackerspace-ec-website's Introduction

11ty-starter

This is eleventy starter.

It uses sass, nunjucks, rollup.

It also has i18n support.

DEMO on github pages

Installation

You can init repo with this template.

How to create project from a template

Or just clone this repo, remove .git directory and init with your own git repo.

File stucture

src/en - put your pages here. For other language create directory named {lang}.json for example and add {lang}.json file.

{
    "locale": "lang"
}

src/posts/en - your posts

src/_includes/pages - pages layouts. Create your pages here and export them in src/en directory files.

src/_inlcudes/layouts - layouts.

  • base.njk - main layout with head, header, main, footer sections.
  • post.njk - layout for post using base layout.
  • about.njk - layout for about page. With markdown content.
  • home.njk - layout for all other pages.

src/assets - your css and js

src/assets/css

  • components - sass components. c prefix.

  • layouts - grid, flexbox layouts. l prefix.

  • pages - styles for pages. p prefix.

  • utilties - utility styles like u-mr--8 (margin-right: 0.5rem). u prefix.

  • base.scss - base html elements styles.

  • functions.scss - sass functions.

  • mixins.scss - sass mixins.

  • prism.scss - prism tomorrow night colorscheme

  • reset.scss - reset

  • settings.scss - css variables.

  • variables.scss - sass variables.

src/assets/js - example index.js file. You can remove it, if you don't need js. Don't forget to remove rollup, rollup-plugin-terser and @rollup/plugin-node-resolve dependencies. Also remove <script> tag from _includes/layouts/base.njk

static - static files are copied directly to /_site.

_data - data files with translations for each page, metadata and other stuff.

Deploy

Github pages

Edit build:eleventy:pathPrefix in package.json.

change path prefix option --pathprefix=your-repo-name

Caddy

domainname.com {
    root * ~/_site # or whatever site directory
    file_server

    handle_errors {
        rewrite * /{http.error.status_code}.html
        file_server
    }

    log {
        output file /var/log/caddy/caddy.log
    }
}

hackerspace-ec-website's People

Contributors

anirudhrowjee avatar anparfenov avatar siddarthpai avatar saksham-13 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.