Git Product home page Git Product logo

my-website's Introduction

My Website

This is my website build with the static website generator metalsmith.

Config

  • config.js: storing simple props for the various build files
  • gulp.js: this is main build tool file.
  • postcss.config.js: this is a helper config for gulp style building.
  • metalsmith.js: this is the Metalsmith build tool file.
  • penthouse.config.js: this is the critical CSS build tool file.

Dev

  • npm start is doing watching and serving

Serve

Your site is now running at http://localhost:3000!

Edit src/content/index.md. Save your changes and the browser will update.

Build

The build chain is rather complex here. But so you have a freedom to adjust it.

  • npm run build
  • npm run build:prod for production build, which also creates with a critical CSS

We have here assets which go into an assets sub dir in the ./dist dir. There is also a assets-root dir which contents move direct into the root of the dist dir.

dist dir

Is cleaned up on a metalsmith build. Only the metalsmith build puts things into the dist dir currently.

assets-root

These are files which are expected to be in root of this website.

They contain the faviconHash which in metalsmith gets added by the build script run. So not here!

critical CSS

To create a critical CSS it is necessary here that we have a website built and running to take a snapshot with the criticalCss tool.

After that it is necessary to build the site again.

assets version bump

CSS and JS files are versioned by a query param configured in the metalsmith config / build file with styleVersion or styleVersion.

Lint

  • npm run lint

Deploy

  • is done with GitHub actions

my-website's People

Contributors

andrekelling avatar wernerglinka avatar dependabot[bot] avatar webketje 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.