The theme was originally made by HTML5 UP Multiverse | HTML5 UP
DEMO: http://i.idinr.com
- Show Image Exif Info
- Fully Responsive
- HTML5 + CSS3
- FontAwesome Icons
- Multi-level Albums Support
- Basic Breadcrumbs
- Automated Image Fit
- Easy Config With JSON
- Faster
- auto parse Exif data
-
Clone this repo.
-
Create a file
config.json
in root directory.config example:
{ "title": "My Blog", "description": "My Blog description", "author": "author name", "children": [ { "title": "a dog image", "description": "description of this image", "url": "a image url" }, { "title": "a image collection,", "description": "description of this collection", "url": "a thumbnail of this collection", "children": [ // a collection must have children field { "url": "a image url" } ] } ] }
note:
- The root node will be used to generate home page.
- A image collection must have children and title field.
- If a item is collection then generate a page for it.
- A single image must have url field.
-
Excute generator
cd project_dir ./blog-cli
-
A
public
directory will be created, use it as your server root
There are two ways to store image: cdn or local. Only four Exif fields will be displayed:
- focal
- iso
- aperture
- shutter
If you want show Exif of a image in cdn,you should the field:extra
of its parent collection node.
A cdn url must start with http of https to distinguish from local image uri.
"extra": {
"image_exif_query_suffix": "?exif",
"image_style_suffix": "$blog"
}
image_exif_query_suffix: to fetch url exif data from cdn api. image_style_suffix: if the cdn url has a image style suffix the replace it to get original url.
note: I wrote this code because i use qiniu(七牛云)
,I did not handle other cdn service because they are too many.
- create a directory named by
image
- put all your iamges in
- specify the url field with prefix
/image
,because this mean the root of website
A local image will be extracted Exif info automatically.
{
"title": "title",
"url": "http://xx.com/ss.jpg",
"exif": {
"focal": "1",
"iso": "100",
"shutter": "1/1000",
"aperture": "1/1"
}
},
It is a Rust Application.
- Rust Environment
- Tera
- Serde
- Serde_json
- Urlencoding
Defined in src/config.rs
The default template is template/index.html
and be used by all the pages.
Template Engine is Tera https://tera.netlify.app/docs/.