Kagami (鏡) is a GitHub nameplate generator built in PHP.
- Place
process.php
andresources
folder inside the same directory, this readme assumes such directory iskagami
under the site root - Add the following to .htaccess so 404 goes to process.php, make sure the process.php is linked with absolute path
<IfModule mod_rewrite.c>
RewriteEngine On
ErrorDocument 404 /kagami/process.php
</IfModule>
DirectoryIndex process.php
Options -Indexes
- Add a folder named
cache
under same directory, generated images will be cached here - Change configuration in
process.php
to fit your environment if needed$num_dir_from_root
Number of nested directory counted from site root$cache_dir
Cached images directory$restricted
To filter allowed users$use_cache
To control if a new image should be generated each time
https://your-domain.com/kagami/GITHUB_USERNAME/NAME
To recolor icon to white for better apperance on top of a black background, add an extra slach at the end, this will trigger the recoloring process.
https://your-domain.com/kagami/GITHUB_USERNAME/NAME/
- Cached images need to be manually deleted for new generation to occur. Kagami indicates whether or not if an image is from cache by sending an extra header
Kagami: New Image
orKagami: Cache