Giter VIP home page Giter VIP logo

victorwesterlund.com's Introduction

Local installation

If someone for whatever reason want to set up their own environment of this. Here's how you do so assuming you have NGINX up and running:

  1. Clone this repo
git clone https://github.com/VictorWesterlund/victorwesterlund.com
  1. Create an NGINX site config

    Create and enable a new site + server config with the root pointed to the /public folder inside the repo.

  2. Add support for .mjs

    I'm using the hyped .mjs extension for the ES modules and NGINX does not serve the correct MIME-type for these yet.

    Open /etc/nginx/mime.types with your text editor of choice and add mjs to the application/javascript MIME-type. Save and exit.

    types {
       ...
       application/javascript          js mjs;
       ...
    }
    

    Psst: if you shiver at the sight of JS using another type than your HTML:s and CSS:ess (you are my kind of nerd), replace application/javascript with text/javascript and remain WHATWG compliant๐Ÿ˜š

  3. Fire up NGINX with the new config

    Verify that your changes are valid and restart NGINX. Hop over to your browser and navigate to your set endpoint - fingers crossed ๐Ÿคž

    nginx -t
    sudo systemctl restart nginx
    

victorwesterlund.com's People

Contributors

victorwesterlund avatar

Watchers

 avatar

victorwesterlund.com's Issues

HTTP/2 Support

Would be nice wouldn't it.

This is more of a reminder to do it as all it takes is to add http2 to each listen directive where HTTP/2 should be enabled.

listen 443 ssl http2;
listen [::]:443 ssl http2;

Relative cache root makes child directories invalid

The current SW root appends to a relative path from the current location. This makes any requests to assets in subdirectories fail.

https://victorwesterlund.com/assets/img/pattern.gif -> Actual path
https://victorwesterlund.com/some/sub/directory/assets/img/pattern.gif -> Appended (invalid) path

Service Worker "pattern.gif"

pattern.gif doesn't fallback to cached static asset upon failure of network fetch to rewritten URL with new Request()

image

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.