Coder Social home page Coder Social logo

barber-jekyll's Introduction

Barber

Barber is a minimal blog theme built for Jekyll. The blog theme features a masonry grid, endless scrolling, and page transitions. ๐Ÿ’ˆ Barber is also available for Ghost.

Barber

Initial Setup

Customization

Additional Development

Installation

Jekyll requires all dependencies to be saved in the Gemfile. Run bundle install (Install Bundler if it is not already) on your command line after downloading or cloning the theme. You can then run bundle exec jekyll serve or npm start to see your development site. Run bundle exec jekyll build or npm run build to build a production ready site for deployment.

Update Settings

Almost everything to personalize your site is in the _config.yml.

# Site/SEO settings
email: [email protected]
baseurl: ""
permalink: /:year/:month/:day/:title/
google_analytics: 

name: Thomas Vaeth
title: The Barber Theme
description: >
  Barber is a blog theme for Jekyll built by Thomas Vaeth for Samesies using HTML, Sass, and JavaScript.
url: http://barber.samesies.io
twitter_username: thomasvaeth
default_img: /assets/images/seo.jpg
social:
  - name: twitter
    url: https://twitter.com/thomasvaeth
  - name: instagram
    url: https://www.instagram.com/thomas.vaeth/
  - name: linkedin
    url: https://www.linkedin.com/in/thomasvaeth/
  - name: github
    url: https://github.com/samesies
  - name: codepen
    url: https://codepen.io/thomasvaeth/

# Contact settings
contact_img: /assets/images/placeholder-28.jpg
formcarry: https://formcarry.com/s/HkIo0nMb7

# Disqus settings
disqus: test-apkdzgmqhj

# MailChimp settings
mailchimp_action: https://samesies.us17.list-manage.com/subscribe/post-json?u=66ddf555dab480e6a8606430b&id=89b3ee034f
mailchimp_input: b_66ddf555dab480e6a8606430b_89b3ee034f

# Author settings
author:
  - name: Thomas Vaeth
    bio: Thomas Vaeth was born in New York, raised in Pennsylvania, and transplanted in Washington. He was a Web Developer at Urban Influence, but now he's a Software Engineer at Getty Images.
    url: http://thomasvaeth.com

# Pagination settings
pagination:
  enabled: true
  debug: false
  per_page: 12
  permalink: '/page/:num/'
  title: ':title'
  limit: 0
  sort_field: 'date'
  sort_reverse: true
autopages:
  enabled: true
  categories:
    enabled: false
  collections:
    enabled: false
  tags:
    layouts: 
      - 'tag.html'
    title: 'The Barber Theme'
    permalink: '/tag/:tag'
    slugify:
      mode: raw
      cased: true

You can change the URL the contact form is sent to, add Google Analytics, change the SEO settings, grow your website with additional authors, and much more.

Create Posts

All posts go upder the _posts directory. You can also have a _drafts directory with posts that will on your development page, but not in production.

---
layout: post
title: "Brunch Swag"
date: 2017-02-18
description: 
image: /assets/images/placeholder-15.jpg
author: Thomas Vaeth
tags: 
  - XOXO
  - La Croix
---

The front matter has to have a layout of page. All the other fields are completely optional. If you have an author variable, then it must match an author's name in _config.yml (see Update Settings). The tag variable will add a related section to the post and popular tags to the footer.

Create Pages

Creating a static page is the same as creating a post. The only difference is a page is in the root of the directory rather than the _posts directory.

---
layout: page
title: Style Guide
image: /assets/images/placeholder-18.jpg
---

You just have to make sure the front matter has a layout of page instead of post. If there is no title or image, then the page will default to the site configuration.

Create Navigation

You can create a navigation in _includes/navigation.html. Visitors can be linked directly to pages right on the top of your website.


Contact Form

The form uses Formcarry to send submitted messages straight to your inbox. The image on the popup is the the contact_img variable and the URL the forms sends to is the formcarry variable in _config.yml (see Update Settings).

Contact Form

This file can be found in _includes/formscarry.html. You can change the labels of the form here. After everything is set you will need to submit a message to yourself to confirm everything is correct.

Social Media Links

Font Awesome is used for the social media icons. The icons in the theme can be found in _includes/share.html and _includes/social.html. The icons in _includes/share.html do not need to be edited unless you want to remove a certain website; however, the ones in _includes/social.html do have to be changed. You can follow the example that has been provided in _config.yml for you to link to all of your social media accounts (see Update Settings). The naming convention has not changed from the instructions provided on Font Awesome.

Disqus Comments

Comments can be enabled on every blog post in a few steps steps. The first step is to register your website with Disqus. Disqus will provide you with a shortname that you need for the next step. Once you have that the second step is to replace the disqus variable in _config.yml (see Update Settings). The third step is to open _includes/disqus.html and remove all the instructions. The final step is to visit a blog post and verify that your comments are there.


Deployment

GitHub Pages does not support custom plugins. The tag list and tag pagination are built using custom plugins. There are several options to avoid any errors while deploying to production.

  • Run bundle exec jekyll build or npm run build and manually add the contents of the _site folder to the gh-pages branch.
  • Link the repository to Netlify. Netlify will then rebuild the theme every time a commit is pushed to the repo.
  • Finish setting up the s3-website package that is already included in the theme. This would deploy the theme to AWS S3 when npm run deploy is run.

Source Code

The source code is broken down to make finding what you need as easy as possible. Almost everything runs through gulpfile.js, so you will need to run npm install on your command line before doing any additional development. You can then run gulp or npm run gulp to compile everything.

.
โ”œโ”€โ”€ _assets
|   โ”œโ”€โ”€ js
|       โ”œโ”€โ”€ components
|       โ”œโ”€โ”€ vendor
|       โ”œโ”€โ”€ _inits.js
|       โ””โ”€โ”€ app.js
|   โ””โ”€โ”€ scss
|       โ”œโ”€โ”€ base
|       โ”œโ”€โ”€ components
|       โ”œโ”€โ”€ fonts
|       โ”œโ”€โ”€ regions
|       โ”œโ”€โ”€ tools
|       โ”œโ”€โ”€ utils
|       โ”œโ”€โ”€ vendor
|       โ””โ”€โ”€ app.scss
โ”œโ”€โ”€ _includes
|   โ”œโ”€โ”€ contact.html
|   โ”œโ”€โ”€ disqus.html
|   โ”œโ”€โ”€ footer.html
|   โ”œโ”€โ”€ formcarry.html
|   โ”œโ”€โ”€ head.html
|   โ”œโ”€โ”€ header.html
|   โ”œโ”€โ”€ navigation.html
|   โ”œโ”€โ”€ pagination.html
|   โ”œโ”€โ”€ post-card.html
|   โ”œโ”€โ”€ share.html
|   โ”œโ”€โ”€ social.html
|   โ””โ”€โ”€ subscribe_form.html
โ”œโ”€โ”€ _layouts
|   โ”œโ”€โ”€ compress.html
|   โ”œโ”€โ”€ default.html
|   โ”œโ”€โ”€ page.html
|   โ”œโ”€โ”€ post.html
|   โ””โ”€โ”€ tag.html
โ”œโ”€โ”€ _plugins
โ”œโ”€โ”€ _posts
โ”œโ”€โ”€ _site
โ”œโ”€โ”€ assets
|   โ”œโ”€โ”€ css
|   โ”œโ”€โ”€ images
|   โ”œโ”€โ”€ js
โ”œโ”€โ”€ .eslintrc
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ .stylelintrc
โ”œโ”€โ”€ 404.html
โ”œโ”€โ”€ _config.yml
โ”œโ”€โ”€ Gemfile
โ”œโ”€โ”€ Gemfile.lock
โ”œโ”€โ”€ gulpfile.js
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ style-guidle.html
โ””โ”€โ”€ subscribe.html

The CSS is written in Sass. The JavaScript is written in ES6, so your code is up to date with the newest standards.

Donations

Barber has been released for free. Similar themes cost around $29 on ThemeForest. Any donations would be greatly appreciated after the work that went into releasing Barber.

  • PayPal โ€“ https://www.paypal.me/samesies
  • Bitcoin โ€“ 1PSzNmcfAFJY1PtBK5u9R5bTGfF7KAuLcq
  • Ethereum โ€“ 0x392F7116e4171F1D740397B6000EadD2e4bb9670
  • Litecoin โ€“ LSH9AnjcUTV5T7PUxXQuxPqb9W5aSR9GEP

Support

Email [email protected] if you need any additional support with Barber.

barber-jekyll's People

Contributors

adam-ah avatar chefomar avatar danbjoseph avatar thomasvaeth 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  avatar

barber-jekyll's Issues

Ruby 2.6.0 ffi dependency error

ffi version 1.9.25 requires Ruby less than 2.6.0, so an error occurs when Ruby 2.6.0 is installed.
I updated ffi to version 1.10.0 in gemfile.lock to resolve the issue.

ruby_dep version incompatibility

I'm just cloned your repo on a Linux Mint 21.3 machine and ran bundle install but got the following error message:

ruby_dep-1.5.0 requires ruby version >= 2.2.5, ~> 2.2, which is incompatible with the current version, ruby 3.0.2p107

Sorry, I'm not very experienced with ruby. Could you please advise what I may be doing wrong?

Thanks!

Disqus

My web have same comments on every page? How to configure it on every pages with different comments?

Ruby dep incompatible with ruby 3.0

I'm trying to bundle the theme, when running bundle I get

ruby_dep-1.5.0 requires ruby version >= 2.2.5, ~> 2.2, which is incompatible with the current version, ruby 3.0.0p0

This doesn't seem to be fixed easily without getting rid of the deprecated ruby_dep (see also https://stackoverflow.com/questions/65617026/cannot-bundle-update-bundler-in-ubuntu-20-04). Is there any chance this can be fixed in the future?

I can bundle it after running bundle update, however then running bundle exec jekyll serve gives:

bundler: failed to load command: jekyll (/usr/local/lib/ruby/gems/3.0.0/bin/jekyll)
/usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `require': cannot load such file -- rexml/parsers/baseparser (LoadError)
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `require'
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `require'
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `require'
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `<class:Kramdown>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:60:in `<module:Parser>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:19:in `<module:Kramdown>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:17:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/converters/smartypants.rb:3:in `require'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/converters/smartypants.rb:3:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:13:in `require'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:13:in `block in require_all'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:12:in `each'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:12:in `require_all'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:194:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/exe/jekyll:8:in `require'
	from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/exe/jekyll:8:in `<top (required)>'
	from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
	from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in `load'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in `kernel_load'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:28:in `run'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/cli.rb:494:in `exec'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/cli.rb:30:in `dispatch'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/cli.rb:24:in `start'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/exe/bundle:49:in `block in <top (required)>'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
	from /Users/felixger/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.15/exe/bundle:37:in `<top (required)>'
	from /usr/local/opt/ruby/bin/bundle:23:in `load'
	from /usr/local/opt/ruby/bin/bundle:23:in `<main>'

Is there an easy workaround? I'm not very familiar with ruby...

How to serve with github pages?

Hi, I'm not getting how to set up the URL/baseurl etc in config.yml, can you give me some guidance on how to serve with github pages?

Not clear how to install

I am newbie in GitHubPages, so I installed my repository, and by default is the minima theme.
Now, how to switch it to the barber theme? I downlaoded a zip file, what should I do with it?

The readme is not clear on this subject:

Run bundle install on your command line after downloading or cloning the theme.

How do you imagine bundle install is linked with a downloaded zip file in the downloads folder??

Cannot change Formspree email address

Firstly, thanks a lot for sharing this jekyll theme. I've been trying to use it to build my own website, and host it on Bitbucket. I have, however, run into a strange error when modifying the site.email variable in the _config.yml file, to define the email address to which all Formspree entries should be sent. If I leave it as [email protected], the Formspree form submission works just okay. If I change it to any other email address, after I click Send in the contact form, I get a "Something Went Wrong" error message. Would you be able to pinpoint where I may be doing something wrong? I just spent a few hours trying to troubleshoot this, but couldn't solve it. Thanks!

And apologies if I just spammed your email address with test submits while I was trying to troubleshoot this issue. It took me a while to figure out what I was doing before I realised I might be spamming you.

Customizing pages

First, thanks for an elegant and easy-to-use theme. I've a couple of questions, coming from someone who has little experience with Jekyll and not much front-end. I can learn quickly.

  1. I'd like to create a new page that serves as an archive of all posts. Is it possible to do that automatically - as in every time I add a post to _post.

  2. How can I manage a page, not just a post, using markdown? Seems like I'd create a new layout that uses the markdown div. Is that correct?

Cannot build on Github pages

Hi! I am trying to serve the site from Github pages, but it keeps showing: Your site is having problems building: Page build failed. For more information, see https://help.github.com/articles/troubleshooting-github-pages-builds/.. Even from a clean fork from your repo.

Is there any specific configuration required for deploying into github pages?
Thanks for such an amazing template :)

can't add more than one author

adjusting the _config.yml file as follows

# Author settings
author:
  - name: Thomas Vaeth
    bio: Thomas Vaeth was born in New York, raised in Pennsylvania, and transplanted in Washington. He was a Web Developer at Urban Influence, but now he's a Software Engineer at Getty Images.
    url: http://thomasvaeth.com
  - name: me
    bio: a real person
    url: https://me.github.io

results in a repeat at the bottom of posts?
Screen Shot 2019-08-07 at 1 53 12 PM

Deprecation warning with Document#tags

I get this deprecation warning many times during the build

Deprecation: Document#tags is now a key in the #data hash.
Deprecation: Called by ["C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/jekyll-3.6.3/lib/jekyll/document.rb:374:in `method_missing'"].

The watch/build seems to working but theses warnings are really annoying and I don't know how to fix them.

List / bullet text increases size when nested

Hi @thomasvaeth - I'm back.

I noticed funny behaviour when populating the site. The text on nested lists increases, the further nested the list is. I expected the font-size stay the same. I tried to peek into _assets/scss/base/_lists.scss (line 28) but to no avail.

This issue seems to describe the same problem.

Reproducing the bug:

This code...

* I have a coin
  * I have a coin
    * I have a coin
      * I have a coin

<ul>
  <li>All projects throughout</li>
  <li>All projects throughout</li>
  <ul>
    <li>All projects throughout</li>
    <li>All projects throughout</li>
    <ul>
      <li>All projects throughout</li>
      <li>All projects throughout</li>
    </ul>
  </ul>
</ul>

... Produces the following output:

image

Ccross-origin object Erro mailChimp

I'm not able to receive the response of my subscription (mailship form).
Printed Error:
[Show/hide message details.] SecurityError: Permission denied to access property "host" on cross-origin object

I am running my page on Netlify system, and I have checked that subscription is working, the error seams to be on the callback.

Do you know if I need to do something different?

rss icon

Hi!
I was triying to include the rss icon in the social media links section of the config file, but it doesn't get rendered in the page. Is there a way to update the fontawesome icons included?

Trying to change favicon

I'm trying to change the default favicon. I uploaded a new image and replaced the default one inside the assets/images folder with my own and gave the file the same name of "favicon.ico". I then pushed the files to github to deploy my site.
However, occasionally the old favicon keeps showing up when I load the website. Doen't make sense to me since the old image is no longer in the assets/images folder.

localhost

my all link become localhost:4000 when site already upload to github.io
I don't know how to fix it

Changing the header/splash image height for posts/pages

Hey, great theme!

I've been tweaking it for my blog and have been trying for a while to change the maximum height or aspect ratio of the 'splash' image underneath the title of each post (if an image has been selected). I tried changing some values in _post.scss and _posts.scss but that did not do the trick.

In which direction should I be looking for this change?

Quick unrelated question too: I set the site title to an image instead of plain text by changing:

{{ site.title }} in /_includes/header.html to <img style="height:2.5em;" src="/assets/images/header-logo.svg"></img>

Is that a good method?

No content when go live

Hi, when i hosted on local, the contents were fine, but when I push live, there is no content up there. Is it only happen to me? I didn't see anyone has the same issue...

Blank page

When I use the suggested steps to set up the project, serve and open it at localhost:4000 the main pages don't work. 404.html and the article pages work, but not the overview.

I am using Ubuntu 17.10.

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.