Browse Source

1.2.0

master
ramswaroop 3 years ago
committed by Niduroki
parent
commit
60d20c95ca
7 changed files with 35 additions and 10 deletions
  1. +4
    -2
      README.md
  2. +6
    -2
      _config.yml
  3. +12
    -1
      _includes/header.html
  4. +11
    -4
      gulpfile.js
  5. BIN
      images/fulls/DSC_0126.jpg
  6. BIN
      images/thumbs/DSC_0126.jpg
  7. +2
    -1
      package.json

+ 4
- 2
README.md View File

@ -18,6 +18,8 @@ it's hosted by GitHub for __free__.
3. Upload your pictures to `images/fulls` and `images/thumbs` directory. _You can do that on github.com itself or you can clone and push the images to your repo._
4. Add your own custom domain in `CNAME` file or just remove the file if you don't own a domain. _You can use the default domain that github provides._
5. And that's it, your website is set. To view, go to [photography.ramswaroop.me](http://photography.ramswaroop.me) (or whatever you have in the CNAME file) and if you don't have one, you can go to [yourusername.github.io/photography](http://yourusername.github.io/photography)
And of course, you don't want my name at the bottom to show up. You can change it in `_config.yml` file as well as few other settings like your google analytics etc.
## ProTips
I have made this as an [npm](https://www.npmjs.com) package with [gulp](http://gulpjs.com/) to __automate image resizing
@ -25,8 +27,8 @@ and thumbnail generation__. So if you're lazy like me then you can just do the f
1. Go inside the project `$ cd photography`
2. Install all dependencies by `$ npm install`
3. Copy all your pictures (the largest size available, straight from your camera) and put it inside `images/fulls` directory
4. `$ gulp` to resize the images and to generate thumbnails for faster page loads
3. Copy all your pictures (possibly jpg, the largest size available, straight from your camera) and put it inside `images` directory
4. Run `$ gulp` to resize the images and to generate thumbnails automatically
5. Push your changes to github.com by `$ git commit -am "a nice commit message"` and then `$ git push origin master`
## Credits


+ 6
- 2
_config.yml View File

@ -1,13 +1,17 @@
# Base configs
baseurl: ""
url: "http://photography.ramswaroop.me"
image_fulls_loc: "/images/fulls"
image_thumbs_loc: "/images/thumbs"
google_analytics: "UA-46465113-2"
# UI configs
title: "Photography by Ram Patra"
subtitle: "See the world through my eyes!"
author: "Ram Patra"
bio: "I am a developer and a tech aficionado from India. Love making teeny tiny apps solving tiny problems in life and now learning photography."
publicise: "Want a website like this for yourself for free? Just <a href=\"https://github.com/ramswaroop/photography\">fork me on github</a> ;)"
web_design: "AJ"
image_fulls_loc: "/images/fulls"
image_thumbs_loc: "/images/thumbs"
social_urls:
facebook: "https://www.facebook.com/ramswaroop"
twitter: "https://www.twitter.com/ramswarooppatra"


+ 12
- 1
_includes/header.html View File

@ -7,4 +7,15 @@
<!--[if lte IE 9]>
<link rel="stylesheet" href="assets/css/ie9.css"/><![endif]-->
<!--[if lte IE 8]>
<link rel="stylesheet" href="assets/css/ie8.css"/><![endif]-->
<link rel="stylesheet" href="assets/css/ie8.css"/><![endif]-->
<!-- Google Analytics -->
{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}

+ 11
- 4
gulpfile.js View File

@ -1,17 +1,24 @@
var gulp = require('gulp');
var imageResize = require('gulp-image-resize');
var del = require('del');
gulp.task('default', function () {
gulp.src('images/fulls/*')
gulp.task('resize', function () {
gulp.src('images/*.*')
.pipe(imageResize({
width: 1024,
imageMagick: true
}))
.pipe(gulp.dest('images/fulls'));
gulp.src('images/fulls/*')
gulp.src('images/*.*')
.pipe(imageResize({
width: 512,
imageMagick: true
}))
.pipe(gulp.dest('images/thumbs'));
});
});
gulp.task('del', function () {
return del(['images/*.*']);
});
gulp.task('default', ['resize', 'del']);

BIN
images/fulls/DSC_0126.jpg View File

Before After
Width: 1024  |  Height: 1536  |  Size: 815 KiB

BIN
images/thumbs/DSC_0126.jpg View File

Before After
Width: 512  |  Height: 768  |  Size: 267 KiB

+ 2
- 1
package.json View File

@ -1,6 +1,6 @@
{
"name": "photography",
"version": "1.1.2",
"version": "1.3.0",
"description": "A jekyll website for photographer cum developer",
"main": "npmfile.js",
"scripts": {
@ -26,6 +26,7 @@
},
"homepage": "https://github.com/ramswaroop/photography#readme",
"devDependencies": {
"del": "^2.2.2",
"gulp": "^3.9.1",
"gulp-image-resize": "^0.12.0"
}


Loading…
Cancel
Save