neilk / octopress-flickr

Display Flickr images, video, and sets in Octopress blog posts
MIT License
18 stars 3 forks source link

Undefined variable: "$sans" #8

Open EmDee opened 11 years ago

EmDee commented 11 years ago

Trying to generate the site, using the cleanpress theme, gives me this error:

error sass/screen.scss (Line 39 of sass/plugins/_flickr.scss: Undefined variable: "$sans".)

Where should that variable be defined?

EmDee commented 11 years ago

Just found it: it's in

sass/base/_typography.scss

I guess, if you have a custom theme you gotta do a lot of customization to have this plugin work.

neilk commented 11 years ago

Sorry, I've tested it with the default theme as well as one of the more popular ones. I guess I assumed $sans was more or less standard.

Is there some other way I could figure out what your default typefaces are?

EmDee commented 11 years ago

I'm using the cleanpress theme, linked in the first post, but I guess I could post it again: https://github.com/macjasp/cleanpress Thanks for the plugin, btw!

neilk commented 11 years ago

Sorry, I edited the comment after the fact. BTW, in your first comment, for some reason it's showing me a broken image link instead of a link to cleanpress.

Anyway, the question now is if there's some other, more standardized way to figure out the theme's typefaces. If you can give me some hints that would help.

neilk commented 11 years ago

The font seems to be defined here. I supposed I could test for $font-default too, but that seems pretty lame. Perhaps I should leave the font unspecified and hope they do the right thing with caption elements and so on.

EmDee commented 11 years ago

I'm pretty new in the Octopress area, so can't really help you there. But usually relying on people to implement something correctly is rather dangerous, if it's not in the specifications. Thus, I'm not quite sure if leaving out the font specification is good or bad. Is $font-default required when creating your own theme?

neilk commented 11 years ago

Almost nothing in Octopress is required. It's more like a set of tools than a framework.

With regards to getting the font choice wrong, I think we may have different definitions of the word 'dangerous'.

gep13 commented 10 years ago

@neilk I ran into this same issue when trying to use octopress-flickr on my site which uses a theme from YinYang here:

https://github.com/qingwang/octopress-theme-yinyang

As a noob to both Jekyll and Octopress, I am not clear on exactly what I would need to change in order to work around this issue. Would you be able to point me in the right direction?

Thanks!

neilk commented 10 years ago

@gep13 This is a guess, I have not tried it but it might work. The yinyang theme gets its fonts from octopress-theme-yinyang/sass/base/_font.scss. It seems there is a $font-default value defined there. So perhaps change the line in octopress-flickr/sass/plugins/_flickr.scss from $sans to $font-default and it might work, if the files are being loaded in the right order.

Worst case scenario, change the line referring to $sans in octopress-flickr/sass/plugins/_flickr.scss to a font you know is loaded.

gep13 commented 10 years ago

@neilk Thanks for looking into this! I will give this a try. :+1: