GithubHelp home page GithubHelp logo

keepers.photos's Introduction

Overview

This folder hosts the keepers.photos website. Here are the main moving parts and how they interact:

  1. The HTML source code is located in the src folder. The HTML is written in Jinja2 templating language. The HTML is compiled into static HTML files using the compile.py build tool.
  2. The javascript, images and other public assets are located in assets folder. The HTML files from src will also be compiled into this folder, which becomes the input for the vite development server and build tools.
  3. Lastly, vite build assets into the docs folder for deployment on github pages.

Setup Dev Environment

npm install
python3 -m venv .
pip install -r requirements.txt
. bin/activate

Also, we use modd to watch for changes in the python files. Install it if you don't have it.

To test html on multiple devices simultaenously, we want vite to bind to a local LAN IP address. (Please refer to vite.config.js). Note also that we only use the last IP address in the list of IP addresses.

Also, from Sonoma onwards, we might get more than one, so we need to pick the last one, hence the tail -n 1 part.

echo "export VITE_HOST=$(ifconfig | grep -o 'inet 192[^ ]*' | awk '{print $2}' | tail -n 1)" >> ~/.zshrc
source ~/.zshrc

Run

modd && node_modules/vite/bin/vite.js dev

Build for deployment

During the build process, the vite compile, minimizes and bundles the assets into the docs folder, which is then served by github pages.

find src -name '*.html' -exec python compile.py {} \;
node_modules/vite/bin/vite.js build
git add .
git commit
git push

keepers.photos's People

Contributors

alexdong avatar shonenada avatar

Watchers

 avatar

keepers.photos's Issues

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.