jekyll / minima

Minima is a one-size-fits-all Jekyll theme for writers.
https://jekyll.github.io/minima/
MIT License
3.39k stars 3.6k forks source link

Enabling Skin Removes Social Links #511

Closed CurtisLeeBolin closed 4 years ago

CurtisLeeBolin commented 4 years ago

I am using master, 49f6dce. When I add the following to _config.yml, as shown in README.md, the dark skin looks great, but the social links disappear.

minima:
  skin: dark
ashmaroli commented 4 years ago

Could you push your code to a public GitHub repository? Note: You can then use GitHub Pages' remote_theme feature to demo the dark skin bug for us.

CurtisLeeBolin commented 4 years ago

ashmaroli, no need. It can be seen with just a clone of minima.

$ git clone https://github.com/jekyll/minima.git
$ cd minima/
$ bundle install
$ bundle exec jekyll serve

Social Links are fine

Add the skin setting to _config.yml

minima:
  skin: dark
$ bundle exec jekyll serve

Social Links are gone

EDIT: corrected github link

RajeevAtla commented 4 years ago

I don't think that's the recommended way to change skins. Instead, go to /assets/css/style.css and change

"minima/skins/{{ site.minima.skin | default: 'classic' }}",

to

"minima/skins/{{ site.minima.skin | default: 'dark' }}",

ngzhio commented 4 years ago

I don't think that's the recommended way to change skins. Instead, go to /assets/css/style.css and change

"minima/skins/{{ site.minima.skin | default: 'classic' }}",

to

"minima/skins/{{ site.minima.skin | default: 'dark' }}",

Yes, that's the recommended way. We set skin in _config.yml.

ngzhio commented 4 years ago

ashmaroli, no need. It can be seen with just a clone of minima.

$ git clone https://github.com/jekyll/minima.github
$ cd minima/
$ bundle install
$ bundle exec jekyll serve

Social Links are fine

Add the skin setting to _config.yml

minima:
  skin: dark
$ bundle exec jekyll serve

Social Links are gone

Weird, I didn't reproduce the phenomena you described through the steps you provided. Maybe you should upload some screenshots and tell us your local environment, for example, the versions of Jekyll, Bundle, or OS.

CurtisLeeBolin commented 4 years ago

Weird, I didn't reproduce the phenomena you described through the steps you provided. Maybe you should upload some screenshots and tell us your local environment, for example, the versions of Jekyll, Bundle, or OS.

@ngzhio, I am new to ruby, but it seems bundler should be providing a consistent environment for the two of us.

From bundler.io:

Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.

I am adding the Gemfile.lock file since it should show the versions of the Gems in the environment bundler is creating. The environment should be very clean as I don't use ruby for anything else.

I'm now on another computer also running Arch Linux. ruby has never been installed. I'll go though the steps of installing ruby and bundle to get these versions for you.

Installing ruby and bundler

$ sudo pacman -Syu ruby

$ gem install bundler
Fetching bundler-2.1.4.gem
Successfully installed bundler-2.1.4
1 gem installed

$ PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"

No skin

Capturing screenshot and html

$ git clone https://github.com/jekyll/minima.git
$ cd minima/
$ bundle install
$ bundle exec jekyll serve

$ curl -o no-skin.html localhost:4000

Added skin

Capturing screenshot and html

Add the skin setting to _config.yml

minima:
  skin: dark
$ bundle exec jekyll serve

$ curl -o skin.html localhost:4000

Showing diff of the two html files

Below you can see social links being removed in the diff of the two html files:

$ diff no-skin.html skin.html 
102c102
<     <div class="social-links"><ul class="social-media-list"><li><a rel="me" href="https://github.com/jekyll" title="jekyll"><svg class="svg-icon grey"><use xlink:href="/assets/minima-social-icons.svg#github"></use></svg></a></li><li><a rel="me" href="https://twitter.com/jekyllrb" title="jekyllrb"><svg class="svg-icon grey"><use xlink:href="/assets/minima-social-icons.svg#twitter"></use></svg></a></li></ul>
---
>     <div class="social-links"><ul class="social-media-list"></ul>

Versions

ruby-2.7.1 rubygems-3.1.2 bundler-2.1.4.gem Gemfile.lock.txt I had to add .txt to the end of a few file names so it is supported by github issues.

Screenshot and html files

Before applying the skin

no-skin.html.txt Screenshot from 2020-04-22 00-53-58

After applying the skin

skin.html.txt Screenshot from 2020-04-22 00-54-47

ngzhio commented 4 years ago

I guess I know what the hell is it. How do you set skin: dark in _config.yml? If you append the below block into _config.yml

minima:
  skin: dark

it will swallow the previous setting, so that the social links are invisible.

You should insert skin: dark under the already set minima property.

CurtisLeeBolin commented 4 years ago

@ngzhio, below is the _config.yml. I believe it is already set the way you are suggesting.

title: Your awesome title
author:
  name: GitHub User
  email: your-email@domain.com
description: > # this means to ignore newlines until "show_excerpts:"
  Write an awesome description for your new site here. You can edit this
  line in _config.yml. It will appear in your document head meta (for
  Google search results) and in your feed.xml site description.

show_excerpts: false # set to true to show excerpts on the homepage

# Minima date format
# refer to https://shopify.github.io/liquid/filters/date/ if you want to customize this
minima:
  date_format: "%b %-d, %Y"

  # generate social links in footer
  social_links:
    twitter: jekyllrb
    github:  jekyll
    # devto: jekyll
    # dribbble: jekyll
    # facebook: jekyll
    # flickr:   jekyll
    # instagram: jekyll
    # linkedin: jekyll
    # pinterest: jekyll
    # youtube: jekyll
    # youtube_channel: UC8CXR0-3I70i1tfPg1PAE1g
    # youtube_channel_name: CloudCannon
    # telegram: jekyll
    # googleplus: +jekyll
    # microdotblog: jekyll
    # keybase: jekyll

    # Mastodon instances
    # mastodon:
    # - username: jekyll
    #   instance: example.com
    # - username: jekyll2
    #   instance: example.com

    # GitLab instances
    # gitlab:
    # - username: jekyll
    #   instance: example.com
    # - username: jekyll2
    #   instance: example.com

# If you want to link only specific pages in your header, uncomment
# this and add the path to the pages in order as they should show up
#header_pages:
# - about.md

# Build settings
theme: minima

minima:
  skin: dark

plugins:
 - jekyll-feed
 - jekyll-seo-tag
ashmaroli commented 4 years ago

@CurtisLeeBolin The error is that you have two minima: keys in your config file. There should only be one.

ngzhio commented 4 years ago

Do you notice that there are two minima property? The solution is moving skin: dark into the first minima property.

The first:

屏幕快照 2020-04-22 下午2 34 35

The second:

屏幕快照 2020-04-22 下午2 34 43
ashmaroli commented 4 years ago

I'm closing this ticket since it clearly is an error at the user's end.

CurtisLeeBolin commented 4 years ago

@ngzhio, that was it. Thank you.