Skip to content
/ Kagami Public

Kagami (鏡) is a GitHub nameplate generator

Notifications You must be signed in to change notification settings

yuhuili/Kagami

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Kagami

Yuhui Li

Kagami (鏡) is a GitHub nameplate generator built in PHP.

Setup

  • Place process.php and resources folder inside the same directory, this readme assumes such directory is kagami 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

Usage

Yuhui Li Lab

https://your-domain.com/kagami/GITHUB_USERNAME/NAME

Yuhui Li

      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/

Notes

  • 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 or Kagami: Cache

About

Kagami (鏡) is a GitHub nameplate generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages