Looks interesting but how do I create a gallery
Opened this issue · 3 comments
Yes, I like the layout and functionality. I don't see any command to run to build a gallery?
I didn't expect anybody would try to use this, so I didn't document it well. Sorry!
- Clone the repo
- Delete all the content in
photos.json
(they're mine):rm photos.json && touch photos.json
- Delete everything inside
./photos
and./photos_thumb
- Build/install matsurika (also available as
matsurika
on AUR):- clone:
git clone https://github.com/eshrh/matsurika
cd matsurika
make
sudo make install
if you like, but note this isn't compatible with janet if you have that installed as well
- clone:
In any case, you should have access to build/mts
or mts
or your path. Now you can run
~/path/to/matsurika/build/mts site.mts ~/path/to/photo
And follow the prompts to add ~/path/to/photo
to your gallery. This will
- add the photo to
photos.json
- add html to
index_template.html
and rewriteindex.html
- copy the photo to
./photos
and create a corresponding thumbnail
Really, site.mts
is just a program to help you do the templating. If you don't want to add all your photos one by one, you can also just edit the json by hand, and then run site.mts
with no arguments to regenerate the template.
Let me know if you get stuck on anything!
Thanks for the procedure. I'm on windows so I don't have "make". Is it do-able on windows?
To be totally honest, i'm not sure if it'll work at all on windows.
Even though janet compiles on windows, I'm fairly certain my fork won't build, and I haven't tested it.
If you're highly motivated you could try to figure something out with their build instructions https://github.com/janet-lang/janet#windows, it seems like a pain though.
Sorry!
In any case, practically all the functionality and layout of my site comes from https://photoswipe.com/. The only original thing this repository has is the templating and photo addition mechanism. I'd imagine it'd be easier to write some JS to feed photoswipe your images.