mmistakes / minimal-mistakes

:triangular_ruler: Jekyll theme for building a personal site, blog, project documentation, or portfolio.
https://mmistakes.github.io/minimal-mistakes/
MIT License
12.24k stars 25.36k forks source link

No CSS in posts #1503

Closed ekofi closed 6 years ago

ekofi commented 6 years ago

Environment informations

Please include theme version, Jekyll version, whether you are hosting with GitHub Pages, and the operating system you are on or tested with.


Expected behavior

No CSS in posts

Steps to reproduce the behavior

-config my config -post's config my post's config -no css or layout ka-boom! no css

mmistakes commented 6 years ago

Doesn't look like you've set url in _config.yml properly.

Be sure that matches the location of your production site so the CSS, JS, and other assets resolve to the correct paths.

ekofi commented 6 years ago

@mmistakes i just forked minimal mistakes. i read quick-start guide and delete them: .editorconfig .gitattributes

Update: I send another post, but it doesnt seem.

mmistakes commented 6 years ago
  1. Check your default configs as it looks wrong to me. Remove the _posts line (or comment it out), it should be the following:
defaults:
  - scope:
      path: ""
      type: posts
    values:
      layout: single
      author_profile: true
      read_time: true
      comments: # true
      share: true
      related: true
  1. I don't advise forking the theme. Since you're hosting with GitHub Pages you should follow the "remote theme" instructions.

  2. You have quite a few of the theme's development only files still in your repo that should be removed:

https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/#remove-the-unnecessary

  1. Your Gemfile is going to give you problems as its the development version... another reason forking the theme directly isn't a good idea. It should resemble this instead. I suggest reading over the docs and follow them for how to edit/create a valid Gemfile for running a GitHub Pages friendly version of Jekyll locally.

https://mmistakes.github.io/minimal-mistakes/docs/installation/#install-dependencies

ekofi commented 6 years ago

Thanks, problem solved.

pgyogesh commented 6 years ago

I'm also facing something similar issue.

My Repo: https://github.com/pgyogesh/blog Blog: http://pgyogesh.com/blog/

-Yogesh

hkalant commented 6 years ago

@pgyogesh The layout in your posts' front-matter should be layout: single, not layout: post.

Better yet, you can define the layout once in config.yml as following:

defaults:
  - scope:
      path: ""
      type: posts
    values:
      layout: single
      author_profile: true
      read_time: true
      comments: # true
      share: true
      related: true

So you don't have to include it in every single post.