eshrh / photo-gallery

static site generator for a personal photo gallery using photoswipe
GNU General Public License v3.0
1 stars 0 forks source link

Looks interesting but how do I create a gallery #1

Open tyeeman opened 1 year ago

tyeeman commented 1 year ago

Yes, I like the layout and functionality. I don't see any command to run to build a gallery?

eshrh commented 1 year ago

I didn't expect anybody would try to use this, so I didn't document it well. Sorry!

  1. Clone the repo
  2. Delete all the content in photos.json (they're mine): rm photos.json && touch photos.json
  3. Delete everything inside ./photos and ./photos_thumb
  4. Build/install matsurika (also available as matsurika on AUR):
    1. clone: git clone https://github.com/eshrh/matsurika
    2. cd matsurika
    3. make
    4. sudo make install if you like, but note this isn't compatible with janet if you have that installed as well

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

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!

tyeeman commented 1 year ago

Thanks for the procedure. I'm on windows so I don't have "make". Is it do-able on windows?

eshrh commented 1 year ago

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.