Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

assets

Repository of static assets used by various projects of Pipal Academy.

Hosted at https://assets.pipal.in/

Organization

All the third-party libraries as added into vendor, with full name and then symlinked into assets.

$ tree -L 3 .
.
├── LICENSE
├── Makefile
├── README.md
├── assets
│   └── fontawesome
│       ├── 5 -> ../../vendor/fontawesome-free-5.15.4-web
│       └── 5.15.4 -> ../../vendor/fontawesome-free-5.15.4-web
└── vendor
    └── fontawesome-free-5.15.4-web
        └── ...

This allows keeping multiple versions of assets.

Since the assets don't change over time, it would be possible to cache them aggressively.

How to a add a new asset

This repository is mainly for keeping track of third-party assets, each with a released version.

To include a new package or a new version of an existing package:

Step 1: Add the package to vendor/.

Add the released package, as it is published to vendor/. It recommended to include the version number in the directory name. For example, use vendor/jquery-3.6.1 instead of vendor/jquery.

Step 2: Create a directory for the package name.

$ mkdir assets/jquery

Step 3: Symlink the package

Symlink the package with full version number and also with the major version number.

$ cd assets/jquery
$ ln -s ../../vendor/jquery-3.6.1 3.6.1
$ ln -s ../../vendor/jquery-3.6.1 3

Deploying

Pushing to main automatically deploys the assets/ directory to GitHub Pages (see .github/workflows/gh-pages.yml), served at https://assets.pipal.in/.

Symlinks under assets/ are resolved to real files during the build, since GitHub Pages does not reliably serve symlinked files.

The repository still has the old SSH-based deploy path (make deploy), kept here in case it's still needed for other hosts:

$ make
ssh -A pipal@pipal.in git -C assets pull
Already up-to-date.

About

Repository of static assets used by various projects of Pipal Academy

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages