Skip to content

Commit b540ded

Browse files
committed
feat: copy logo and favicon files to stagit directory
Add copying of logo.png and favicon.png from web server stagit directory to the generated stagit output directory, similar to how CSS files are already copied. This ensures the stagit-generated sites have the proper branding assets available. This script is incredibly hacky - I wouldn't recommend relying on /src/ sticking around forever. I may end up migrating to a different thing altogether later down the line, depending on whether or not I feel like rewriting the post-receive hook.
1 parent 02de9a0 commit b540ded

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

post-receive

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,5 +373,21 @@ my ( $stagit_css_source, $stagit_css_destination ) = (
373373
say "Copying CSS from $stagit_css_source to $stagit_css_destination" if $opt_v;
374374
copy $stagit_css_source, $stagit_css_destination;
375375

376+
my ( $stagit_logo_source, $stagit_logo_destination ) = (
377+
catfile( $web_server_dir, qw(stagit logo.png) ),
378+
catfile( $stagit_dir, 'logo.png' )
379+
);
380+
381+
say "Copying logo from $stagit_logo_source to $stagit_logo_destination" if $opt_v;
382+
copy $stagit_logo_source, $stagit_logo_destination;
383+
384+
my ( $stagit_favicon_source, $stagit_favicon_destination ) = (
385+
catfile( $web_server_dir, qw(stagit favicon.png) ),
386+
catfile( $stagit_dir, 'favicon.png' )
387+
);
388+
389+
say "Copying favicon from $stagit_favicon_source to $stagit_favicon_destination" if $opt_v;
390+
copy $stagit_favicon_source, $stagit_favicon_destination;
391+
376392
say "Gzipping files in $stagit_dir" if $opt_v;
377393
find make_wanted( \&gzip_files ), $stagit_dir;

0 commit comments

Comments
 (0)