-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94f7762
commit 870ff33
Showing
71 changed files
with
3,705 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
source "https://rubygems.org" | ||
|
||
# Hello! This is where you manage which Jekyll version is used to run. | ||
# When you want to use a different version, change it below, save the | ||
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: | ||
# | ||
# bundle exec jekyll serve | ||
# | ||
# This will help ensure the proper Jekyll version is running. | ||
# Happy Jekylling! | ||
gem "jekyll", "~>3.6.0" | ||
gem "rake", "~>10.5" | ||
gem "sass", "~>3.4" | ||
gem "json", "~> 2" | ||
|
||
|
||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and | ||
# uncomment the line below. To upgrade, run `bundle update github-pages`. | ||
# gem "github-pages", group: :jekyll_plugins | ||
|
||
# If you have any plugins, put them here! | ||
group :jekyll_plugins do | ||
gem "bourbon", "~>4.3" | ||
gem "jekyll-feed", "~>0.6" | ||
gem "jekyll-paginate-v2" | ||
gem "pygments.rb" | ||
gem "jekyll-compose" | ||
gem "kramdown" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
addressable (2.5.2) | ||
public_suffix (>= 2.0.2, < 4.0) | ||
bourbon (4.3.4) | ||
sass (~> 3.4) | ||
thor (~> 0.19) | ||
colorator (1.1.0) | ||
ffi (1.9.25) | ||
forwardable-extended (2.6.0) | ||
jekyll (3.6.3) | ||
addressable (~> 2.4) | ||
colorator (~> 1.0) | ||
jekyll-sass-converter (~> 1.0) | ||
jekyll-watch (~> 1.1) | ||
kramdown (~> 1.14) | ||
liquid (~> 4.0) | ||
mercenary (~> 0.3.3) | ||
pathutil (~> 0.9) | ||
rouge (>= 1.7, < 3) | ||
safe_yaml (~> 1.0) | ||
jekyll-compose (0.5.0) | ||
jekyll (>= 3.0.0) | ||
jekyll-feed (0.9.2) | ||
jekyll (~> 3.3) | ||
jekyll-paginate-v2 (2.0.0) | ||
jekyll (~> 3.0) | ||
jekyll-sass-converter (1.5.2) | ||
sass (~> 3.4) | ||
jekyll-watch (1.5.1) | ||
listen (~> 3.0) | ||
json (2.1.0) | ||
kramdown (1.17.0) | ||
liquid (4.0.0) | ||
listen (3.1.5) | ||
rb-fsevent (~> 0.9, >= 0.9.4) | ||
rb-inotify (~> 0.9, >= 0.9.7) | ||
ruby_dep (~> 1.2) | ||
mercenary (0.3.6) | ||
multi_json (1.12.1) | ||
pathutil (0.16.1) | ||
forwardable-extended (~> 2.6) | ||
public_suffix (3.0.3) | ||
pygments.rb (1.1.2) | ||
multi_json (>= 1.0.0) | ||
rake (10.5.0) | ||
rb-fsevent (0.10.3) | ||
rb-inotify (0.9.10) | ||
ffi (>= 0.5.0, < 2) | ||
rouge (2.2.1) | ||
ruby_dep (1.5.0) | ||
safe_yaml (1.0.4) | ||
sass (3.6.0) | ||
sass-listen (~> 4.0.0) | ||
sass-listen (4.0.0) | ||
rb-fsevent (~> 0.9, >= 0.9.4) | ||
rb-inotify (~> 0.9, >= 0.9.7) | ||
thor (0.19.4) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
bourbon (~> 4.3) | ||
jekyll (~> 3.6.0) | ||
jekyll-compose | ||
jekyll-feed (~> 0.6) | ||
jekyll-paginate-v2 | ||
json (~> 2) | ||
kramdown | ||
pygments.rb | ||
rake (~> 10.5) | ||
sass (~> 3.4) | ||
|
||
BUNDLED WITH | ||
2.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
# mariosergio.me | ||
# mariosergio.me | ||
Personal website | ||
|
||
## Start in 4 steps | ||
1. Download or clone repo git clone | ||
2. Enter the folder: `cd mariosergio.me` | ||
3. Install Ruby gems: `bundle install` | ||
4. Start Jekyll server: `bundle exec jekyll serve` | ||
|
||
You can find the source code for Jekyll at github.com/jekyll/jekyll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
# encoding: UTF-8 | ||
require "rubygems" | ||
require "tmpdir" | ||
require "bundler/setup" | ||
require "jekyll" | ||
require "bourbon" | ||
|
||
# Change your GitHub reponame | ||
GITHUB_REPONAME = "sergiomario/mariosergio.me" | ||
GITHUB_REPO_BRANCH = "main" | ||
|
||
SOURCE = "source/" | ||
DEST = "_site" | ||
CONFIG = { | ||
'layouts' => File.join(SOURCE, "_layouts"), | ||
'posts' => File.join(SOURCE, "_posts"), | ||
'post_ext' => "md", | ||
'categories' => File.join(SOURCE, "categories"), | ||
'tags' => File.join(SOURCE, "tags") | ||
} | ||
|
||
task default: %w[publish] | ||
|
||
desc "Generate blog files" | ||
task :generate do | ||
Jekyll::Site.new(Jekyll.configuration({ | ||
"source" => "source/", | ||
"destination" => "_site", | ||
"config" => "_config.yml" | ||
})).process | ||
end | ||
|
||
desc "Generate and publish blog to gh-pages" | ||
task :publish => [:generate] do | ||
Dir.mktmpdir do |tmp| | ||
cp_r "_site/.", tmp | ||
|
||
pwd = Dir.pwd | ||
Dir.chdir tmp | ||
|
||
system "git init" | ||
system "git checkout --orphan #{GITHUB_REPO_BRANCH}" | ||
system "git add ." | ||
message = "Site updated at #{Time.now.utc}" | ||
system "git commit -am #{message.inspect}" | ||
system "git remote add origin [email protected]:#{GITHUB_REPONAME}.git" | ||
system "git push origin #{GITHUB_REPO_BRANCH} --force" | ||
|
||
Dir.chdir pwd | ||
end | ||
end | ||
|
||
desc "Begin a new post in #{CONFIG['posts']}" | ||
task :post do | ||
abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts']) | ||
title = ENV["title"] || "Novo post" | ||
|
||
tags = "" | ||
categories = "" | ||
|
||
# tags | ||
env_tags = ENV["tags"] || "" | ||
tags = strtag(env_tags) | ||
|
||
# categorias | ||
env_cat = ENV["category"] || "" | ||
categories = strtag(env_cat) | ||
|
||
# slug do post | ||
slug = mount_slug(title) | ||
|
||
begin | ||
date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d') | ||
time = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%T') | ||
rescue => e | ||
puts "Error - date format must be YYYY-MM-DD, please check you typed it correctly!" | ||
exit -1 | ||
end | ||
|
||
filename = File.join(CONFIG['posts'], "#{date}-#{slug}.#{CONFIG['post_ext']}") | ||
if File.exist?(filename) | ||
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' | ||
end | ||
|
||
puts "Creating new post: #{filename}" | ||
open(filename, 'w') do |post| | ||
post.puts "---" | ||
post.puts "layout: post" | ||
post.puts "title: \"#{title.gsub(/-/,' ')}\"" | ||
post.puts "permalink: #{slug}" | ||
post.puts "date: #{date} #{time}" | ||
post.puts "comments: true" | ||
post.puts "description: \"#{title}\"" | ||
post.puts 'keywords: ""' | ||
post.puts "categories:" | ||
post.puts "#{categories}" | ||
post.puts "tags:" | ||
post.puts "#{tags}" | ||
post.puts "---" | ||
end | ||
end # task :post | ||
|
||
|
||
desc "Create a new page." | ||
task :page do | ||
name = ENV["name"] || "new-page.md" | ||
filename = File.join(SOURCE, "#{name}") | ||
filename = File.join(filename, "index.html") if File.extname(filename) == "" | ||
title = File.basename(filename, File.extname(filename)).gsub(/[\W\_]/, " ").gsub(/\b\w/){$&.upcase} | ||
if File.exist?(filename) | ||
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' | ||
end | ||
|
||
slug = mount_slug(title) | ||
|
||
mkdir_p File.dirname(filename) | ||
puts "Creating new page: #{filename}" | ||
open(filename, 'w') do |post| | ||
post.puts "---" | ||
post.puts "layout: page" | ||
post.puts "title: \"#{title}\"" | ||
post.puts 'description: ""' | ||
post.puts 'keywords: ""' | ||
post.puts "permalink: \"#{slug}\"" | ||
post.puts "slug: \"#{slug}\"" | ||
post.puts "---" | ||
post.puts "{% include JB/setup %}" | ||
end | ||
end # task :page | ||
|
||
def mount_slug(title) | ||
slug = str_clean(title) | ||
slug = slug.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') | ||
|
||
return slug | ||
end | ||
|
||
def str_clean(title) | ||
return title.tr("ÀÁÂÃÄÅàáâãäåĀāĂ㥹ÇçĆćĈĉĊċČčÐðĎďĐđÈÉÊËèéêëĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħÌÍÎÏìíîïĨĩĪīĬĭĮįİıĴĵĶķĸĹĺĻļĽľĿŀŁłÑñŃńŅņŇňʼnŊŋÒÓÔÕÖØòóôõöøŌōŎŏŐőŔŕŖŗŘřŚśŜŝŞşŠšſŢţŤťŦŧÙÚÛÜùúûüŨũŪūŬŭŮůŰűŲųŴŵÝýÿŶŷŸŹźŻżŽž", "AAAAAAaaaaaaAaAaAaCcCcCcCcCcDdDdDdEEEEeeeeEeEeEeEeEeGgGgGgGgHhHhIIIIiiiiIiIiIiIiIiJjKkkLlLlLlLlLlNnNnNnNnnNnOOOOOOooooooOoOoOoRrRrRrSsSsSsSssTtTtTtUUUUuuuuUuUuUuUuUuUuWwYyyYyYZzZzZz") | ||
end | ||
|
||
def strtag(str_tags) | ||
tags = ""; | ||
|
||
if !str_tags.nil? | ||
arr_tags = str_tags.split(",") | ||
arr_tags.each do |t| | ||
tags = tags + "- " + t.delete(' ') + "\n" | ||
end | ||
end | ||
|
||
return tags | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Build settings | ||
permalink: /posts/:year/:title/ | ||
markdown: kramdown | ||
highlighter: pygments | ||
plugins: [jekyll-paginate-v2] | ||
|
||
pagination: | ||
enabled: true | ||
per_page: 3 | ||
permalink: "/page/:num/" | ||
|
||
comments: true | ||
|
||
source: source | ||
destination: _site | ||
sass: | ||
sass_dir: _sass | ||
style: compressed # expanded | ||
|
||
# SEO settings | ||
title: Mário Sérgio | ||
description: "Presentation page of Mário Sérgio" | ||
keywords: "community, python, empowerment, diversity, development, civi tech, web" | ||
url: http://mariosergio.me | ||
baseurl: "" | ||
|
||
google_analytics: UA-179236608-1 | ||
repo: http://github.com/sergiomario/mariosergio.me | ||
disqus_shortname: "sergiomario" | ||
disqus_site_shortname: "sergiomario" | ||
|
||
# Author settings | ||
author: | ||
name: Mário Sérgio | ||
job: Program Manager and Developer | ||
bio: "I am a people empowerment enthusiast." | ||
thumb: /images/profile.jpg | ||
email: [email protected] | ||
url: https://mariosergio.me/ | ||
github: https://github.com/sergiomario | ||
twitter: https://twitter.com/sergiomarioq | ||
facebook: https://facebook.com/mariosergio.oliveira.75 | ||
linkedin: https://linkedin.com/in/sergiomarioq | ||
|
||
# navbar pages | ||
navbar: | ||
- slug: about | ||
title: About | ||
- slug: posts | ||
title: Posts | ||
- slug: talks | ||
title: Talks | ||
- slug: podcasts | ||
title: Podcasts | ||
- slug: projects | ||
title: Projects | ||
|
||
exclude: ["config.rb", "src", "Gemfile", "Gemfile.lock", "package.json","README.md", "Rakefile"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env /bin/bash | ||
set -e # halt script on error | ||
|
||
cd source/_sass/ | ||
bourbon install | ||
cd ../../ | ||
|
||
bundle exec jekyll build |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
layout: page | ||
permalink: /404.html | ||
--- |
Oops, something went wrong.