From 50b77ffaf60f27fd8918659d6ba151f8d9b9c7be Mon Sep 17 00:00:00 2001 From: Pavel Ivanov Date: Mon, 24 Feb 2014 19:44:14 +0200 Subject: [PATCH 1/2] initial commit --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..52657fc --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +www.fridaycode.net From 0ae15bc08edbd81709dc42e96c1fd8136736a209 Mon Sep 17 00:00:00 2001 From: Pavel Ivanov Date: Mon, 24 Feb 2014 21:24:43 +0200 Subject: [PATCH 2/2] add grunt with jekyll --- .develo/activate | 27 +++ .develo/console | 41 ++++ .develo/db | 32 +++ .develo/deploy | 34 +++ .develo/server | 18 ++ .develo/update | 38 ++++ .gitignore | 6 + .jsfilesrc | 5 + Gemfile | 2 + Gemfile.lock | 62 +++++ _config.yml | 15 ++ gruntfile.js | 213 ++++++++++++++++++ package.json | 29 +++ src/_layouts/default.html | 44 ++++ src/_layouts/post.html | 9 + .../2014-02-24-welcome-to-jekyll.markdown | 24 ++ src/assets/css/style.css | 4 + src/assets/js/dist/main.min.js | 5 + src/assets/js/source/main.js | 1 + src/assets/sass/style.sass | 3 + src/index.html | 13 ++ 21 files changed, 625 insertions(+) create mode 100755 .develo/activate create mode 100755 .develo/console create mode 100755 .develo/db create mode 100755 .develo/deploy create mode 100755 .develo/server create mode 100755 .develo/update create mode 100644 .gitignore create mode 100644 .jsfilesrc create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 _config.yml create mode 100644 gruntfile.js create mode 100644 package.json create mode 100644 src/_layouts/default.html create mode 100644 src/_layouts/post.html create mode 100644 src/_posts/2014-02-24-welcome-to-jekyll.markdown create mode 100644 src/assets/css/style.css create mode 100644 src/assets/js/dist/main.min.js create mode 100644 src/assets/js/source/main.js create mode 100644 src/assets/sass/style.sass create mode 100644 src/index.html diff --git a/.develo/activate b/.develo/activate new file mode 100755 index 0000000..98e2c92 --- /dev/null +++ b/.develo/activate @@ -0,0 +1,27 @@ +########################################################################## +# # +# This script is called when you open directory with installed .develo # +# or when you write the command : "develo activate" # +# # +# This script is a perfect place for logic like: # +# # +# - "rvm use 1.9.3" if you use RVM for Ruby ... # +# # +# - "source venv/bin/activate" if you use Python virtualenv.py # +# # +# And stuff like these :) # +# # +########################################################################## + +#### +# Replace these lines of echo code with your meaningful implementation + +echo "Hello from:" +echo "$(pwd)/.develo/${BASH_SOURCE##*/}" +echo +echo "Now your ${BASH_SOURCE##*/} script is blank and useless!" +echo "Hurry up and place your logic there to do something meaningful!" +echo +echo "Bye :)" + +#### \ No newline at end of file diff --git a/.develo/console b/.develo/console new file mode 100755 index 0000000..d2b35dd --- /dev/null +++ b/.develo/console @@ -0,0 +1,41 @@ +########################################################################## +# # +# This script is called when you write the command : "develo console" # +# on project with installed .develo # +# # +# This script is a perfect place for logic like: # +# # +# If you are working on Ruby on Rails project # +# | rails console # +# # +# ... or with some Ruby app # +# | pry # +# or # +# | irb # +# # +# If you are working on Django project # +# | django-admin.py shell # +# or # +# | django-admin.py shell --interface bpython # +# # +# ... or with some Python app # +# | python # +# or # +# | bpython # +# # +# And stuff like these :) # +# # +########################################################################## + +#### +# Replace these lines of echo code with your meaningful implementation + +echo "Hello from:" +echo "$(pwd)/.develo/${BASH_SOURCE##*/}" +echo +echo "Now your ${BASH_SOURCE##*/} script is blank and useless!" +echo "Hurry up and place your logic there to do something meaningful!" +echo +echo "Bye :)" + +#### \ No newline at end of file diff --git a/.develo/db b/.develo/db new file mode 100755 index 0000000..bda3d78 --- /dev/null +++ b/.develo/db @@ -0,0 +1,32 @@ +########################################################################## +# # +# This script is called when you write the command : "develo db" # +# on project with installed .develo # +# # +# This script is a perfect place for logic like: # +# # +# If you are working on Ruby on Rails project # +# | rails dbconsole # +# # +# If you are working on Django project # +# | django-admin.py dbshell # +# # +# If you are working on some PHP project # +# | mysql -h 127.0.0.1 -P 3306 -u -p # +# # +# And stuff like these :) # +# # +########################################################################## + +#### +# Replace these lines of echo code with your meaningful implementation + +echo "Hello from:" +echo "$(pwd)/.develo/${BASH_SOURCE##*/}" +echo +echo "Now your ${BASH_SOURCE##*/} script is blank and useless!" +echo "Hurry up and place your logic there to do something meaningful!" +echo +echo "Bye :)" + +#### \ No newline at end of file diff --git a/.develo/deploy b/.develo/deploy new file mode 100755 index 0000000..06e4504 --- /dev/null +++ b/.develo/deploy @@ -0,0 +1,34 @@ +########################################################################## +# # +# This script is called when you write the command : "develo deploy" # +# on project with installed .develo # +# # +# This script is a perfect place for logic like: # +# # +# If you are using Capistrano for example # +# | git push github master # +# | cap deploy # +# | ... and so on. # +# # +# If you are using Heroku for example # +# | git push github master # +# | git push heroku master # +# | heroku run rake db:migrate # +# | ... and so on. # +# # +# And stuff like these :) # +# # +########################################################################## + +#### +# Replace these lines of echo code with your meaningful implementation + +echo "Hello from:" +echo "$(pwd)/.develo/${BASH_SOURCE##*/}" +echo +echo "Now your ${BASH_SOURCE##*/} script is blank and useless!" +echo "Hurry up and place your logic there to do something meaningful!" +echo +echo "Bye :)" + +#### \ No newline at end of file diff --git a/.develo/server b/.develo/server new file mode 100755 index 0000000..04acec1 --- /dev/null +++ b/.develo/server @@ -0,0 +1,18 @@ +########################################################################## +# # +# This script is called when you write the command : "develo server" # +# on project with installed .develo # +# # +# This script is a perfect place for logic like: # +# # +# If you are working on Ruby on Rails project # +# | rails server # +# # +# If you are working on Django project # +# | django-admin.py runserver 1.2.3.4:8000 # +# # +# And stuff like these :) # +# # +########################################################################## + +bundle exec jekyll serve --watch diff --git a/.develo/update b/.develo/update new file mode 100755 index 0000000..ab8e4a1 --- /dev/null +++ b/.develo/update @@ -0,0 +1,38 @@ +########################################################################## +# # +# This script is called when you write the command : "develo update" # +# on project with installed .develo # +# # +# This script is a perfect place for logic like: # +# # +# If you are working on Ruby project with Bundler # +# | bundle update # +# # +# If you are working on Python project # +# | pip freeze |sed -ne 's/==.*//p' |xargs pip install -U -- # +# # +# If you are working on PHP project # +# | php composer.phar update # +# # +# If you want to update you repo and so on ... # +# | git checkout master # +# | git pull upstream master # +# | git submodule foreach --recursive git submodule update --init # +# | git checkout develop # +# # +# And stuff like these :) # +# # +########################################################################## + +#### +# Replace these lines of echo code with your meaningful implementation + +echo "Hello from:" +echo "$(pwd)/.develo/${BASH_SOURCE##*/}" +echo +echo "Now your ${BASH_SOURCE##*/} script is blank and useless!" +echo "Hurry up and place your logic there to do something meaningful!" +echo +echo "Bye :)" + +#### \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dba639f --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +Thumbs.db +.sass-cache +node_modules + +_site \ No newline at end of file diff --git a/.jsfilesrc b/.jsfilesrc new file mode 100644 index 0000000..eff6278 --- /dev/null +++ b/.jsfilesrc @@ -0,0 +1,5 @@ +{ + "main.min.js": [ + "main.js" + ] +} \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..053c27d --- /dev/null +++ b/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'github-pages' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..7984fe9 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,62 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.2.9) + blankslate (2.1.2.4) + classifier (1.3.4) + fast-stemmer (>= 1.0.0) + colorator (0.1) + commander (4.1.6) + highline (~> 1.6.11) + fast-stemmer (1.0.2) + ffi (1.9.3) + github-pages (15) + RedCloth (= 4.2.9) + jekyll (= 1.4.3) + kramdown (= 1.3.1) + liquid (= 2.5.5) + maruku (= 0.7.0) + rdiscount (= 2.1.7) + redcarpet (= 2.3.0) + highline (1.6.20) + jekyll (1.4.3) + classifier (~> 1.3) + colorator (~> 0.1) + commander (~> 4.1.3) + liquid (~> 2.5.5) + listen (~> 1.3) + maruku (~> 0.7.0) + pygments.rb (~> 0.5.0) + redcarpet (~> 2.3.0) + safe_yaml (~> 0.9.7) + toml (~> 0.1.0) + kramdown (1.3.1) + liquid (2.5.5) + listen (1.3.1) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + rb-kqueue (>= 0.2) + maruku (0.7.0) + parslet (1.5.0) + blankslate (~> 2.0) + posix-spawn (0.3.8) + pygments.rb (0.5.4) + posix-spawn (~> 0.3.6) + yajl-ruby (~> 1.1.0) + rb-fsevent (0.9.4) + rb-inotify (0.9.3) + ffi (>= 0.5.0) + rb-kqueue (0.2.2) + ffi (>= 0.5.0) + rdiscount (2.1.7) + redcarpet (2.3.0) + safe_yaml (0.9.7) + toml (0.1.1) + parslet (~> 1.5.0) + yajl-ruby (1.1.0) + +PLATFORMS + ruby + +DEPENDENCIES + github-pages diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..d96e28a --- /dev/null +++ b/_config.yml @@ -0,0 +1,15 @@ +name: "Fridaycode.net" +timezone: Europe/Sofia +source: src +# permalink: /blog/:title.html + +keywords: "" +description: "" + +markdown: redcarpet +redcarpet: + extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "tables", "with_toc_data"] + +pygments: true + +exclude: ["Rakefile", "Rakefile.rb", "*.sublime-project", "*.sublime-workspace", "gruntfile.js", "package.json", "node_modules"] \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js new file mode 100644 index 0000000..245c71f --- /dev/null +++ b/gruntfile.js @@ -0,0 +1,213 @@ +// # Globbing +// for performance reasons we're only matching one level down: +// e.g. 'bar/foo/{,*/}*.js' +// use this if you want to recursively match all subfolders: +// e.g. 'bar/foo/**/*.js' + +module.exports = function (grunt) { + 'use strict'; + + // show elapsed time at the end + require('time-grunt')(grunt); + // load all grunt tasks + require('load-grunt-tasks')(grunt); + + // setupJsFiles + var setupJsFiles = function(jsonConfigFiles, pkgName) { + var + tempArr = [], + tempJsFiles = {}; + + for (var key in jsonConfigFiles) { + tempArr = []; + + for (var i = 0; i < jsonConfigFiles[key].length; i++) { + tempArr[i] = pkgName + '/assets/js/source/' + jsonConfigFiles[key][i]; + } + + tempJsFiles[ pkgName + '/assets/js/dist/' + key] = tempArr; + } + + return JSON.stringify(tempJsFiles); + }; + + // Need to use var because readJSON can't read <%= templates %> + var json = grunt.file.readJSON('package.json'); + + var jsFiles = JSON.parse(setupJsFiles(grunt.file.readJSON('.jsfilesrc'), json.source)); + + // Init + grunt.initConfig({ + pkg: json, + + jsFiles: jsFiles, + + src: { + sass : '<%= pkg.source %>/assets/sass/**/*.sass', + css : '<%= pkg.source %>/assets/css/**/*.css', + mincss : '<%= pkg.source %>/assets/css/**/*.min.css', + js : '<%= pkg.source %>/assets/js/source/**/*.js', + minjs : '<%= pkg.source %>/assets/js/dist/**/*.min.js' + }, + + // clean all generated files + clean: { + all: { + files: [{ + src: [ + '<%= src.css %>', + '<%= src.minjs %>' + ] + }] + } + }, + + // compass config + compass: { + compile: { + options: { + sassDir: '<%= pkg.source %>/assets/sass/', + cssDir: '<%= pkg.source %>/assets/css/', + imagesDir: '<%= pkg.source %>/assets/img/source', + fontsDir: '<%= pkg.source %>/assets/fonts', + relativeAssets: true, + noLineComments: true, + quiet: true, + outputStyle: 'expanded' + } + } + }, + + cssmin: { + options: { + banner: '/*\n * Author: RaceCloud\n * Last build: <%= grunt.template.today("dd-m-yyyy") %>\n*/\n', + }, + minify: { + expand: true, + cwd: '<%= pkg.source %>/assets/css/', + src: ['*.css', '!*.min.css'], + dest: '<%= pkg.source %>/assets/css/', + ext: '.min.css' + } + }, + + // Concat & minify + uglify: { + options: { + banner: '/*\n * Author: RaceCloud\n * Last build: <%= grunt.template.today("dd-m-yyyy") %>\n*/\n', + report: 'gzip' + }, + dev: { + options: { + mangle: false, + compress: false, + preserveComments: 'all', + beautify: true, + }, + files: ['<%= jsFiles %>'] + }, + dist: { + options: { + mangle: true, + compress: true, + }, + files: ['<%= jsFiles %>'] + } + }, + + // Image Optimization + imagemin: { + dist: { + options: { + optimizationLevel: 3 + }, + files: [ + { + expand: true, + cwd: '<%= pkg.source %>/assets/img/source/', + src: ['**/*.{png,jpg,gif,jpeg}'], + dest: '<%= pkg.source %>/assets/img/dist/' + } + ] + } + }, + + watch: { + options: { + spawn: false + }, + styles_dev: { + files: ['<%= src.sass %>'], + tasks: ['compass', 'newer:cssmin', 'newer:imagemin'] + }, + scripts_dev: { + files: ['<%= src.js %>'], + tasks: ['any-newer:uglify:dev'] + }, + styles_dist: { + files: ['<%= src.sass %>'], + tasks: ['compass', 'newer:cssmin', 'newer:imagemin'] + }, + scripts_dist: { + files: ['<%= src.js %>'], + tasks: ['any-newer:uglify:dist'] + } + }, + + concurrent: { + dev: { + tasks: ['watch:styles_dev', 'watch:scripts_dev', 'jekyll:serve'], + options: { + logConcurrentOutput: true + } + }, + dist: { + tasks: ['watch:styles_dist', 'watch:scripts_dist'], + options: { + logConcurrentOutput: true + } + } + }, + + jekyll: { // Task + options: { // Universal options + bundleExec: true, + src : '<%= pkg.source %>' + }, + + serve : { + options: { + bundleExec: true, + src : '<%= pkg.source %>', + serve: true + } + }, + } + }); + + // Tasks + grunt.registerTask('default', [ + 'clean', + 'compass', + 'newer:cssmin', + 'newer:uglify:dist', + 'concurrent:dist' + ]); + + grunt.registerTask('dev', [ + 'clean', + 'compass', + 'newer:uglify:dev', + 'concurrent:dev' + ]); + + grunt.registerTask('build', [ + 'clean', + 'compass', + 'cssmin', + 'uglify:dist', + 'imagemin', + 'jekyll' + ]); + +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..41afe23 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "Fridaycode", + "source": "src", + "version": "0.0.1", + "main": "gruntfile.js", + "dependencies": { + "grunt": "~0.4.2", + "load-grunt-tasks": "~0.2.1", + "cssmin": "~0.4.1", + "time-grunt": "~0.1.1", + "grunt-newer": "~0.5.3", + "grunt-contrib-watch": "~0.5.3", + "grunt-contrib-uglify": "~0.2.4", + "grunt-contrib-jshint": "~0.6.4", + "grunt-contrib-clean": "~0.5.0", + "grunt-contrib-imagemin": "~0.3.0", + "grunt-contrib-compass": "~0.5.0", + "grunt-contrib-cssmin": "~0.6.2", + "grunt-contrib-csslint": "~0.1.2", + "grunt-concurrent": "~0.4.0" + }, + "devDependencies": { + "grunt-jekyll": "~0.4.1" + }, + "author": [ + "Pavel Ivanov ", + "Marian Ignev " + ] +} diff --git a/src/_layouts/default.html b/src/_layouts/default.html new file mode 100644 index 0000000..f6586b6 --- /dev/null +++ b/src/_layouts/default.html @@ -0,0 +1,44 @@ + + + + + + {{ page.title }} + + + + + + + + + + + +
+ + + {{ content }} + + +
+ + + diff --git a/src/_layouts/post.html b/src/_layouts/post.html new file mode 100644 index 0000000..04e3586 --- /dev/null +++ b/src/_layouts/post.html @@ -0,0 +1,9 @@ +--- +layout: default +--- +

{{ page.title }}

+

{{ page.date | date_to_string }}

+ +
+{{ content }} +
diff --git a/src/_posts/2014-02-24-welcome-to-jekyll.markdown b/src/_posts/2014-02-24-welcome-to-jekyll.markdown new file mode 100644 index 0000000..4360f8b --- /dev/null +++ b/src/_posts/2014-02-24-welcome-to-jekyll.markdown @@ -0,0 +1,24 @@ +--- +layout: post +title: "Welcome to Jekyll!" +date: 2014-02-24 19:51:50 +categories: jekyll update +--- + +You'll find this post in your `_posts` directory - edit this post and re-build (or run with the `-w` switch) to see your changes! +To add new posts, simply add a file in the `_posts` directory that follows the convention: YYYY-MM-DD-name-of-post.ext. + +Jekyll also offers powerful support for code snippets: + +{% highlight ruby %} +def print_hi(name) + puts "Hi, #{name}" +end +print_hi('Tom') +#=> prints 'Hi, Tom' to STDOUT. +{% endhighlight %} + +Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh]. + +[jekyll-gh]: https://github.com/mojombo/jekyll +[jekyll]: http://jekyllrb.com diff --git a/src/assets/css/style.css b/src/assets/css/style.css new file mode 100644 index 0000000..bfcb47b --- /dev/null +++ b/src/assets/css/style.css @@ -0,0 +1,4 @@ +body { + margin: 0; + background: red; +} diff --git a/src/assets/js/dist/main.min.js b/src/assets/js/dist/main.min.js new file mode 100644 index 0000000..0fb98eb --- /dev/null +++ b/src/assets/js/dist/main.min.js @@ -0,0 +1,5 @@ +/* + * Author: RaceCloud + * Last build: 24-2-2014 +*/ +alert("test"); \ No newline at end of file diff --git a/src/assets/js/source/main.js b/src/assets/js/source/main.js new file mode 100644 index 0000000..66d9aec --- /dev/null +++ b/src/assets/js/source/main.js @@ -0,0 +1 @@ +alert("test"); \ No newline at end of file diff --git a/src/assets/sass/style.sass b/src/assets/sass/style.sass new file mode 100644 index 0000000..a0476da --- /dev/null +++ b/src/assets/sass/style.sass @@ -0,0 +1,3 @@ +body + margin: 0 + background: red diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..c726819 --- /dev/null +++ b/src/index.html @@ -0,0 +1,13 @@ +--- +layout: default +title: Your New Jekyll Site +--- + +
+

Blog Posts

+
    + {% for post in site.posts %} +
  • {{ post.date | date_to_string }} » {{ post.title }}
  • + {% endfor %} +
+
\ No newline at end of file