Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for cdn for static assets #726

Closed
2 of 5 tasks
weikinhuang opened this issue Dec 21, 2016 · 8 comments
Closed
2 of 5 tasks

Option for cdn for static assets #726

weikinhuang opened this issue Dec 21, 2016 · 8 comments

Comments

@weikinhuang
Copy link

Please include an option to use a cdn for jquery and font awesome to save on bandwidth costs when using a self hosted option.

  • This is a question about using the theme.
  • I believe this to be a bug with the theme --- not Jekyll, GitHub Pages or one of the bundled plugins.
  • This is a feature request.
  • I have updated all gems with bundle update.
  • I have tested locally with bundle exec jekyll build.
@mmistakes
Copy link
Owner

mmistakes commented Dec 21, 2016

Building an option to use a CDN version of jQuery would introduce several complexities to the theme I'm not comfortable adding.

As far as using a CDN version of Font Awesome, that's fairly easy to do. You have two options depending on how you installed the theme:

Installed as a theme gem

  1. In the root of your site folder add _sass/vendor/font-awesome/_variables.scss
  2. Uncomment line 7 to replace the local font path with the CDN version. $fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.6.3/fonts" !default;
  3. Adding the local _variables.scss FA partial and uncommenting the path will override the scss partial bundled in the theme and use the CDN version of FA instead.

Installed by forking the MM repo

  1. Uncomment line 7 _sass/vendor/font-awesome/_variables.scss

@weikinhuang
Copy link
Author

Alright thanks!

@weikinhuang
Copy link
Author

weikinhuang commented Dec 21, 2016

Actually I just tried it, and it doesn't seem to be picking up the local _sass/vendor/font-awesome/_variables.scss file. I'm using the gem version of the theme. I've tried overriding other files too in the vendor folder and it also doesn't seem to be picking up those changes either.

@mmistakes
Copy link
Owner

I'll have to test and see if I can reproduce.

There's a related issue open for local files in assets not overriding the gem ones #722. If that's the case here then there might be a regression bug with Jekyll that will need to be filled upstream.

@mmistakes
Copy link
Owner

mmistakes commented Dec 22, 2016

I got it to work by copying the entire _sass/vendor/font-awesome/ folder to my local repo, then commenting // $fa-font-path: "../fonts" !default; and uncommenting $fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.6.3/fonts" !default;

Seems like the way Jekyll reads in local files to override the theme gem's versions gets confused when you start @importing levels deeper.

@weikinhuang
Copy link
Author

That works, but still sucks to have to copy the entire directory into an otherwise empty repo. Thanks!

@mmistakes
Copy link
Owner

Agreed. Theme gems are still in their infancy so there are still some kinks to be worked out in Jekyll-land.

@weikinhuang
Copy link
Author

👍

koyumi0601 pushed a commit to koyumi0601/koyumi0601.github.io that referenced this issue Jul 31, 2023
…s in reverse (mmistakes#726)

Set `child_nav_order` to `desc` to reverse the sort order for a child section.

Co-authored-by: Matt Wang <matt@matthewwang.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants