add initial content (home, about-{natalie,site}, its-laptop)
This commit is contained in:
11
www/src/scripts/img-caption
Executable file
11
www/src/scripts/img-caption
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
path=$1
|
||||
caption=$2
|
||||
|
||||
if [ -z "${caption}" ]; then
|
||||
caption="$(basename "$path" | sed 's/-/ /g; s/\.[^.]*$//')"
|
||||
fi
|
||||
|
||||
echo "<figure><a href='$path'><img src='$path' alt='$caption'></a><figcaption>$caption</figcaption></figure>"
|
||||
|
Reference in New Issue
Block a user