Github Pages : use of Remote Theme


#1

_Starting today, you can use any of the hundreds of community-curated themes on GitHub.com.
To build your site with any public, GitHub-hosted theme, add the following to your site’s config.yml file:

remote_theme: owner/name

Been there, done that.
And gotta say I’m a bit of confused.
What does that exactly do, and what it doesn’t do?

Can anyone guide me a bit?

I’m pretty sure this means we don’t have to fork that theme in order to work, or do we?
I’d appreciate any further explanation on this one.


#2

Yes it means you don’t have to fork a theme. As long as the theme is available as a Ruby gem you can use remote_theme.

All it’s doing is pulling down the theme files (layouts, includes, CSS, etc) so you don’t have to manage them. Everything that applies for Gem-based themes applies for those assigned with remote_theme. The only difference being how you “install” them.


#3

what troubles me is - what files should I exactly have in my repo afterwards and what not?

coz right now I get bunch of 404’s , and I get basic skeleton but not card of theme, and don’t see my content, even tho I created .md file with some content.


#4

All depends on the theme you’re using, they’re all different.
Point us to your GH repo, the theme you’re using, and can probably help more.


#5

theme is called Sleek
my repo


#6

You have a bunch of issues as to why this isn’t working.

  1. If you’re using remote_theme don’t use theme as well. Remove theme: jekyll-sleek from your _config.yml file
  2. You have url in _config.yml set wrong. You’ll probably want that to be set to your actual site.
  3. Remove the _layouts folder and files unless you are overriding the ones in the theme.
  4. Your post in _posts isn’t named correctly (e.g. YYYY-MM-DD-your-post.md) and doesn’t have any YAML front matter.
  5. index.md is also missing YAML front matter and content.

After all of those you’ll probably want to follow the theme’s instructions for setting it up as there are likely some other things you need to do.


#7

thank you very much.

so do posts really need to have date before their name? this is not optional?

can I overwrite this somehow, not to have to use date?


#8

I overwrote page in layouts I also typed my site’s title in config,
I’m so frustrated, why doesn’t anything happen. :frowning:


#9

yes they do.

I looked at your site and at a glance it looked ok. The contact page is 404 but I don’t see a contact page in the source.


#10

It’s not the contact page that is problem.
Didn’t set up that one yet.
What I did set up was for name to change from Sleek to something else,
also banner text, but that’s not changing at all.


#11

I would guess it is getting an error when building thus you don’t see any changes.

The error may be that the post isn’t in the correct format - it needs to have the date it in it, try changing that to 2018-01-01-test.md or whatever and see if that fixes it.


#12

it also looks like you don’t have front matter on that post - at the top you need to have to sets of 2 dashes like so:

---
---

you could also remove that post entirely to eliminate it as a source of trouble.


#13

how long does one have to wait for this to rebuild and for changes to take effect?


#14

should be pretty quick, couple minutes.

The logo is an svg and isn’t going to change until you change it. Not sure why the banner isn’t changing.

You are sure you are not getting emails from GH with an error message? it should send you an email when there is an error building.

I would try doing something simple to see if it updates - like change the title in the config and see if the copyright in the footer changes. You could also remove the theme part and see what happens.


#15

I forked your repo and played around with it, I get build errors for that theme, I think maybe it is not a proper gem based theme?

If I use one of mademistakes themes it works fine.

I don’t use gem based themes so I don’t know enough to be able to tell what is wrong with it, I would open up an issue on that repo and see if anyone is able to use it as a remote theme.

Again i don’t use gem based themes so it could easily be something I am doing wrong, I also find it a little interesting that it looks like the theme is working for you, just that you are getting build errors now so it is not updating any changes. hmmmm maybe I’ll keep trying.


#16

I see theme has a gem file in official repo

I’ve never actually tried to do anything with jekyll before, this is my first time.

I know I could have just forked it but since Github so proudly announced it could be done this way, I wanna have it like this.


#17

if you are just starting out / learning I would recommend you fork a non theme based site to see how everything works, I think the themes hide a lot of the nuts and bolts and make it more mysterious than it really is.


#18

I’m getting this error on build now:

jekyll 3.8.0 | Error:  File exists @ dir_s_mkdir - /_site/assets/img/posts

Remove the empty posts file under assets/img/

Doing that built the site. Your homepage looks fine

The first post “Bookofmozilla” doesn’t have any formatting because you don’t have any YAML Front Matter. You’ll want to add a layout and title like so:

---
layout: post
title: "The Book of Mozilla"
---

You can go ahead and remove the #The Book of Mozilla line in your body content as it’s not needed.

I suggest you give Jekyll’s documentation a good read to learn the basics. Then read the theme’s docs to understand how they set things up. Their README doesn’t have much info but looking through their demo site tells you more about how to get started.


#19

great! Thanks a lot for helping me out! :+1: