Git Product home page Git Product logo

hacker-blog's Introduction

The Hacker-Blog theme

Hacker-Blog is a minimalistic, responsive jekyll theme built for hackers. It is based on the hacker theme for project pages.

Demo: https://ashishchaudhary.in/hacker-blog

Included

  1. Pagination
  2. SEO tags
  3. Archive Page
  4. About Page
  5. RSS (https://base-url/atom)
  6. Sitemap (https://base-url/sitemap)
  7. Google Analytics (optional)

Usage

  1. Fork and Clone this repository
  2. Customize your blog
  3. Add a new post in _posts/ directory with proper name format (as shown in placeholder posts)
  4. Commit and push to master on a repository named <githubusername.github.io>.
  5. Visit <githubusername>.github.io

Local Build

If you want to see the changes before pushing the blog to Github, do a local build.

  1. gem install jekyll
  2. gem install jekyll-seo-tag
  3. gem install jekyll-paginate
  4. gem install jekyll-sitemap
  5. (cd to the blog directory, then:) jekyll serve --watch --port 8000
  6. Go to http://0.0.0.0:8000/ in your web browser.

Note: In case you have set a baseurl different than / in _config.yml, go to http://0.0.0.0:8000/BASEURL/ instead.

Local build using docker

docker run --rm -p 8000:8000 \
  --volume="LOCATION_OF_YOUR_JEKYLL_BLOG:/srv/jekyll" \
  -it tocttou/jekyll:3.5 \
  jekyll serve --watch --port 8000

Replace LOCATION_OF_YOUR_JEKYLL_BLOG with the full path of your blog repository. Visit http://localhost:8000/ to access the blog.

Note: In case you have set a baseurl different than / in _config.yml, go to http://0.0.0.0:8000/BASEURL/ instead.

Customizing

Configuration variables

Edit the _config.yml file and set the following variables:

title: [The title of your blog]
description: [A short description of your blog's purpose]
author:
  name: [Your name]
  email: [Your email address]
  url: [URL of your website]

baseurl: [The base url for this blog.]

paginate: [Number of posts in one paginated section (default: 3)]
owner: [Your name]
year: [Current Year]

Note: All links in the site are prepended with baseurl. Default baseurl is /. Any other baseurl can be setup like baseurl: /hacker-blog, which makes the site available at http://domain.name/hacker-blog.

Additionally, you may choose to set the following optional variables:

google_analytics: [Your Google Analytics tracking ID]

About Page

Edit about.md

Layout

If you would like to modify the site style:

HTML

Footer: Edit _includes/footer.html

Header: Edit _includes/header.html

Links in the header: Edit _includes/links.html

Meta tags, blog title display, and additional CSS: Edit _includes/head.html

Index page layout: Edit _layouts/default.html

Post layout: Edit _layouts/post.html

CSS

Site wide CSS: Edit _sass/base.scss

Custom CSS: Make _sass/custom.scss and use it. Then add @import "custom"; to css/main.scss

404 page

Edit 404.md

License

CC0 1.0 Universal

hacker-blog's People

Contributors

mihajlonesic avatar tocttou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hacker-blog's Issues

Warning: deprecated feature use (2020-02-01)

  Generating... 

/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/document.rb:466: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/document.rb:432: warning: Passing the keyword argument as the last hash parameter is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/document.rb:75: warning: The called method merge_data!' is defined here /home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/document.rb:439: warning: Passing the keyword argument as the last hash parameter is deprecated /home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/document.rb:75: warning: The called method merge_data!' is defined here
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/document.rb:466: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/document.rb:466: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/tags/include.rb:179: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/tags/include.rb:179: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/tags/include.rb:179: warning: Using the last argument as keyword parameters is deprecated
/home/web/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/tags/include.rb:179: warning: Using the last argument as keyword parameters is deprecated

error at jekyll 4.0.0

i try to use this theme with jekyll(4.0.0).
but when build jekyll serve, it's occured error.

1: from /Users/vikke/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/external.rb:58:in `block in require_with_graceful_fail'
/Users/vikke/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/external.rb:73:in `rescue in block in require_with_graceful_fail': jekyll-sitemap (Jekyll::Errors::MissingDependencyException)

i installed jekyll-sitemap.

[master]$ gem list | grep jekyll
jekyll (4.0.0)
jekyll-feed (0.13.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (2.0.1)
jekyll-seo-tag (2.6.1)
jekyll-sitemap (1.4.0)
jekyll-watch (2.2.1)

help me please.

Gemfile

Hey. I'm a bit new to this whole jekyll thing, but I noticed you didn't include what to write into the Gemfile and Config to apply this theme to your site. With other themes, such as Hacker, you can write "gem: jekyll-theme-hacker" into Gemfile and then run "bundle install" in the command prompt to add the theme to your site. How do I the same with the hacker blog theme?

create Gemfile and bundle install instructions

Adding gems globally is sometimes done for gem install jekyll. But should really be avoided for other gems. So I'm recommending a controlled local environment with Gemfile.

Problem

Your local install docs require multiple install commands with gem install. This makes it hard to maintain and also the versions you install will not necessarily be the ones on GH Pages. e.g. GH Pages uses 1.2.3 of a gem and the latest you end up installing is 4.5.6

This is particularly important for Jekyll - GH Pages uses Jekyll 3 but you would install Jekyll 4.

Pattern

Follow the pattern from this approach and you'll see Gemfile created.

jekyll new my-blog

Recommended solution

Use approach like this file. Including two gems below Jekyll 3 which allow 3.9 support and Ruby 3 support.

https://github.com/MichaelCurrin/jekyll-blog-demo/blob/master/Gemfile#L3-L11

And then add to docs as:

bundle config set --local path vendor/bundle
bundle install

And ignore vendor in .gitignore

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.