This is the HE:labs Blog code, you can see the live blog on http://helabs.com.br/blog/.
(if you don't have technical knowledge for run the blog on your computer, please go to the end of this README, we have some special tips for you)
To run this project you need to have:
- Ruby 2.1.2 - You can use RVM
-
Install the dependencies above
-
Clone the project
$ git clone git@github.com:Helabs/blog.git
-
Go into the project folder
$ cd blog
-
Install the gem dependencies
$ bundle install
If everything goes OK, you can now run the project!
-
Start the server
$ bundle exec foreman start
-
Open http://localhost:4000/blog/, don't forget to put trailing '/'.
-
This create a file and the branch for your post using the rake task below. You will be prompted to provide the post title, the author and tags (optional).
$ rake new_post
-
Write your post and make sure the author link on the post points to your profile on HE:labs website.
-
Commit your changes.
$ git add . $ git commit -am 'post: Title of the post'
-
Push the branch.
$ git push --set-upstream origin post/title-of-the-post
-
Send a pull request by GitHub web interface.
The syntax used by the blog is the markdown, you can take a look at this cheatsheet for more info.
Use the following syntax:
{% highlight ruby linenos %}
class Say
def hello
say "Hello!"
end
end
{% endhighlight %}
Save your images in /images/posts/YYYY-MM-DD/
. Your image URL will look like this: /blog/images/posts/YYYY-MM-DD/
.
For create a list on your post, always use hyphen (the "-"), like this:
- item1
- item2
- item3
And it will look like this:
- item1
- item2
- item3
Don't use asterisk, otherwise the list will break.
-
Open the pull request's page
-
Check if the publish date is correct on the post filename. It should be the current day. If it's wrong, ask the author to fix it.
-
Click the "Merge pull request" button
-
Click the "Confirm merge" button
-
Click the "Delete branch" button
-
Wait a little bit and access the blog to see the new post
Run:
rake fix_author_links
Then double check if the posts were changed correctly, git commit
and git push
the changes back to the gh-pages
branch.
- Open this file: https://docs.google.com/a/helabs.com.br/document/d/1HTS0j_E18AUsLxeBx2zKQ6aUwZY4Lw_JTdnpvRG3zDA/edit#
Obs: if you don't have access to this file, please, ask for the maintainers.
-
Read the tutorial file and let the maintainers know if there is some doubt about it.
-
When finish your post, send to one of the maintainers the google docs file.
-
After your post go online, share with your friends! ;)
This app was created and is maintained by HE:labs.
Blog of HE:labs and its content is licensed under an Attribution-NonCommercial-ShareAlike 3.0 Unported license.