GithubHelp home page GithubHelp logo

isabella232 / linnullmann Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thenewdynamic/linnullmann

0.0 0.0 0.0 200.63 MB

Personal website for Linn Ullmann

Home Page: http://www.linnullmann.no

JavaScript 34.04% CSS 39.46% HTML 26.50%

linnullmann's Introduction

The New Dynamic

This repo uses the following technologies:

We use a Changelog on all of our projects. Please see that file for updates.

tools

To Use

git clone https://github.com/theNewDynamic/hugo-starter.git yourprojectname

cd yourprojectname

rm -rf .git

git init

git add .

git commit -m "initial commit"

git remote add origin https://github.com/theNewDynamic/YOURPROJECTNAME.git

git push -u origin master

git submodule add https://github.com/theNewDynamic/hugo-layout_module-base.git layout_modules/hugo-layout_module-base

repeat for additional modules

Add theme component to config.toml:

  • theme = ["hugo-layout_module-base", "hugo-layout_module-nameofmodule"]

Note. Hugo uses the "themes" directory by default. We've renamed that to layout_modules.

Assets

To build JS files, we use webpack. The entry point is ./assets/index.js for adding new scripts.

  • Add the script via Yarn (yarn add scriptname -D).
  • Place a file in the JS folder and add the script, or, preferably, require/import it from its node module.
  • Import the file (import "./js/scriptname.js") in the index.js file.

Building Asset Files with Webpack

  1. yarn install
  2. yarn build-dev or yarn build if you want to generate the file once.

Fonts.

When possible, we use Kyle Mathews' Typefaces so that we can server our font files locally. Just add the typeface to assets/index.js and run the webpack build, as above (yarn build). This will generate the font files into the static/fonts directory (which Hugo will automatically copy into the public directory) and generate a fonts CSS file, which then Hugo will minify and fingerprint into your head.

CSS

We use TailwindCSS and several PostCSS plugins to generate CSS. Most of your CSS will be utility classes in your templates. Hugo will not rebuild your CSS file unless the file itself is changed. In a TailwindCSS context, most of your work occurs in templates, not in the CSS file. To make development easier, we've created a separate PostCSS config file without PurgeCSS. However, this means you must run yarn deploy (as outline below) for you push your changes.

Deployment

  1. Before deploying, run yarn deploy (or hugo --gc if you're not generating fonts or JS) to generate a minified, purged CSS file.
  2. Check the resources folder into your repository.

Other Notes

  • PurgeCSS will fail if any of your templates are empty.
  • If you add themes, you may need to add the file location in the PurgeCSS content configuration item. This is done for you, with a glob pattern, but it is something to be aware of.

linnullmann's People

Contributors

budparr avatar regisphilibert 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.