Giter Club home page Giter Club logo

foto's Introduction

foto-cover

foto

Yet another another publishing tool for minimalist photographers.

Demo site: https://foto.lhzhang.com

Features

  • Simple One binary, three commands. No database.
  • Customizable Highly customizable by configuration and template files.
  • Fast Files are handled concurrently.

Install

macOS

$ brew tap waynezhang/tap
$ brew install foto

Or download the binary from here

Other platforms

Download the binary from here

Usage

Create a new site

~ $ foto create my_site
~ $ tree my_site
my_site
├── assets
│   ├── icons
│   │   ├── home.svg
│   │   ├── instagram.svg
│   │   └── twitter.svg
│   └── style.css
├── foto.toml # Configuration file, see below for more details.
├── media
│   └── avatar.jpg # Placeholder image for avatar.
└── templates
    └── template.html # Template file

Preview

~/my_site $ foto preview
Creating Preview...
Listening on 5000...

The default port number is 5000. It can be changed by -p flag.

Export

~/my_site $ foto export -o ~/site_docs
Exprorting sites to /Users/xxx/site_docs...

Clear cache

foto clear-cache

Customize

Basic customize foto.toml

Click to expand
[site]
# The title of the site
title = "A new site"
# The name of the author
author = "Author Here"

# Site navigation links
# You can remove any navigation links or add more link by adding following lines
#     [[site.nav]]
#     icon = ""
#     link = ""
# Navigation links are added in the order encountered.

[[site.nav]]
icon = "assets/icons/home.svg"
link = "https://"

[[site.nav]]
icon = "assets/icons/instagram.svg"
link = "https://instagram.com/xxx"

[[site.nav]]
icon = "assets/icons/twitter.svg"
link = "https://twitter.com/xxx"

# Setttings for photo size
[image]
# Width for thumbnail images
thumbnailWidth = 640
# Width for enlarged images
originalWidth = 2048

# Layout for grids
[layout]
minColumn = 1
maxColumn = 4
minWidth = 200

# Photo sections
# You can remove or add more sections by adding following lines
#     [[section]]
#     title = "section title"
#     text = "section description (HTML supported)"
#     slug = "section-slug"
#     folder = "folder of photos"
#     ascending = false
# Photo sections are added in the order encountered.
[[section]]
title = "Section 1"
text = ""
slug = "section-1"
folder = "~/photos/section-1"
ascending = false

[[section]]
title = "Section 2"
text = ""
slug = "section-2"
folder = "~/photos/section-2"
ascending = false

# Other setings
[others]
# Folders that should be copied together when exporting sites
folders = [ "assets", "media" ]
# Show `Generated by foto` footer or not
show_foto_footer = true

Style customize

Template and CSS styles can be modified without chagning foto binary.

The template file is placed in templates/template.html.

It's also possible to add additional settings in foto.toml (ref) and refer it in template file. foto uses html/template package in Golang. Please refer to this link for more information.

Changelogs

See CHANGELOG

LICENSE

See LICENSE

Credit

foto is highly inspried by moul.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.