Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Move images to '/images' dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarrett committed Feb 22, 2019
1 parent 08bd30e commit bb4d969
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions script/ddgc_export_help.pl
Expand Up @@ -42,6 +42,12 @@ sub _build_pkg_dir {
$self->_mkdir( $self->help_dir, $self->now );
}

has img_dir => ( is => 'lazy' );
sub _build_img_dir {
my ( $self ) = @_;
$self->_mkdir( $self->pkg_dir, 'images' );
}

has user => ( is => 'lazy' );
sub _build_user {
my ( $self ) = @_;
Expand Down Expand Up @@ -98,10 +104,10 @@ sub write_markup {
next unless $m;
$src = '/media/' . $m->filename;
}
copy( catfile( $self->ddgc->config->rootdir_path, $src ), $d );
copy( catfile( $self->ddgc->config->rootdir_path, $src ), $self->img_dir );
$src = $self->filename_for( $src );

$node->attr( 'src', $src );
$node->attr( 'src', "/images/$src" );
}

$content = $tree->as_HTML =~ s{</br>}{}mgr;
Expand Down

0 comments on commit bb4d969

Please sign in to comment.