-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
move css/
directory from jekyll into assets/
#43
Conversation
@@ -8,7 +8,7 @@ | |||
|
|||
{% assign custom_url = site.url | append: site.baseurl %} | |||
{% assign full_base_url = custom_url | default: site.github.url %} | |||
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: full_base_url }}"> | |||
<link rel="stylesheet" href="{{ "/assets/css/main.css" | prepend: full_base_url }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep the permalink of the CSS the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you asking me? or are you requesting me to undo this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either ways, I think the answer is no.. its going to be either assets/css/main.css
or assets/main.css
if we're to follow Parker's Game Plan for Jekyll 3.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For context, the idea here is that /assets
will be a magic folder that will be included in the downstream site, saving the user from needing to create a dedicated scss
file. See #16.
For existing users, it should "just work", but will need to require Jekyll ~> 3.3
in order to ensure we're not breaking existing sites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can a page
in assets/
not have a custom permalink in YAML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assets/css/main.scss
Can we talk through a bit the pros and cons of assets/css/main.scss
versus /assets/main.scss
? I'm just worried we're over optimizing what is otherwise a simple theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm here, if that comment was intended for me..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm advocating assets/css/main.scss
, so the following is in context to that:
pros
- this is a breaking change (to me, at least). I feel, its the right time to initiate the practice of having delegated folders.
css
for stylesheets,js
for scripts,fonts
for well.. fonts. - having this set right now will show users/developers that Jekyll 3.3 supports delegated folders. minima is not just a theme, its also a boilerplate / reference for future theme gems.
cons
- having to create two folders to house one file, while preparing to override default settings.
- (or), in the case of existing sites, having to create
assets/
and move theircss/
to it, instead of simply renamingcss/ -> assets/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashmaroli what's the value of delegated folders? Especially for a small boilerplate site? Anyone sophisticated enough to create a site with multiple javascript or css files will likely be sophisticated enough to not use the default theme. Put another way, if we do this, we have to assume every other theme does the same. Is that the precedence we want to set?
@parkr can the new assets folder support support sub-folders?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benbalter Yes! It supports sub-folders.
We also have the option to add a note to |
@ashmaroli Does that work for you? |
'<minima>/assets/css/main.scss'. | ||
|
||
More Information: | ||
https://github.com/jekyll/minima/issues/43 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Should we add something to the README telling folks how they can use their custom CSS instead, namely by moving their css/main.scss
to assets/css/main.scss
in their site source? Would be good I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can now be changed to https://github.com/jekyll/minima#customization
😄
yes, the README will need an update as well. |
OK great, so let's update the README and set the URL in the postinstall message to point to the specific instructions in the readme. |
|
||
You can choose to override the [`_includes/head.html `](_includes/head.html) file to specify a custom style path. | ||
`css/main.scss` has now moved to a new directory, `assets/` within the theme gem itself. To customize that file, you'll have to create an `assets` directory at the root of your site and copy the entire `css/` over to `<your-site>/assets/`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This is a bit confusing to me to read. What do you think about:
The site's default CSS has now moved to a new place within the gem itself,
assets/css/main.scss
. This is why runningjekyll new
does not output any CSS to your new site. To override the default CSS, create a file in your site source atassets/css/main.scss
and add your custom CSS. If you would like to start with the template file in this repository, copyassets/css/main.scss
to your site at<your-site>/assets/css/main.scss
and edit away!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the input, but I think it was too much info crammed into a few lines.. not good when a confused user checks this section for an answer. So I altered it a bit.
The site's default CSS has now moved to a new place within the gem itself,
assets/css/main.scss
. To override the default CSS, the file has to exist at your site source. Do either of the following:
- Create a new instance of
main.scss
at site source.
- Create a new directory
css
at<your-site>/assets/
- Create a new file
main.scss
at<your-site>/assets/css/
- Add the frontmatter dashes, and
- Add
@import "minima";
, to<your-site>/assets/main.scss
- Add your custom CSS.
- Download the file from this repo
- Create a new directory
css
at<your-site>/assets/
- Create a new file
main.scss
at<your-site>/assets/css/
- Copy the contents at assets/css/main.scss onto the
main.scss
you just created, and edit away!- Copy directly from Minima 2.0 gem
- Go to your local minima gem installation directory ( run
bundle show minima
to get the path to it ).- Copy the
css/
folder from there into<your-site>/assets/
- Change whatever values you want, inside
<your-site>/assets/css/main.scss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I'd like to release this today or tomorrow and this PR is the last piece.
13dc96f
to
88c3cba
Compare
The PR is ready for one final review. |
@jekyll/minima, @jekyll/core: I'm placing this on vote.. till Parker decides to end it.. Thanks |
the styles aren't working when I try this on localhost --- not sure whether that's to be expected, will it need 3.3 to work? |
From a Jekyll Assets standpoint assets/css/main.css would allow us to jimmy ourselves into Jekyll's place and serve all assets with some magic, making things a bit more magical. But at the end of the day we can do that anyways really. So I don't care either way... just sayin' |
@Strangehill Yes, you need Jekyll 3.3. You can run the |
now that jekyll supports `assets/` dir within theme gems, `css/` and its contents will be housed within minima's own `assets/` directory
88c3cba
to
cc49d2e
Compare
I've decided that Minima 2.0 shall release with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
css/
directory from jekyllcss/
directory from jekyll into assets/
@jekyllbot: merge +major |
Major change in minima 2.0, it needs jekyll 3.3: jekyll/minima#43
This breaks all default Jekyll installs. I've just installed the latest gem and my site built without any css due to the theme looking in |
Do you have the source code online for us to debug? |
@ashmaroli Sure thing. If you mean the repo, https://github.com/davidyell/davidyell.github.com/tree/source It's easy to replicate. octopress new OctoTest
cd OctoTest
bundler install
jeykll serve Hit the url and you get Using |
The Issue here is that you have to use |
@ashmaroli Great, thanks. 👍 Might be worth adding that to the readme file for future users. I'd also be tempted to ask the guys over at https://github.com/octopress/octopress to link to this themes repo somewhere in their docs as it took me a while to find the repo. |
What's puzzling is that Minima 2.0 is locked to Jekyll 3.3 n above.. How were you able to successfully run Minima 2.0 against Jekyll 3.2.1?? 🤔 Update: v2.0.0 is not locked to Jekyll 3.3 |
That I'm not sure of. I'm a Ruby noob! |
@benbalter Minima 2.0.0 got released before #59 was merged. So, while the issue reported above wont occur with the next release, I think, its time we release a new version a.s.a.p.. |
At the speed of sap. |
2.1.0 released. @envygeeks If you want a new version of these gems released, please open an issue or reach out to me directly. Belittling us or otherwise insulting the pace of action is hurtful. |
That wasn't even my intention so why are you trying to put words in my mouth and make that my intention? If you need to know I was poking fun at the word "a.s.a.p". Not everybody is out to get you and making wild assumptions like what you just did is how most beefs start. |
@envygeeks I'm sorry – I believed that you were referring to how slowly we were releasing the new version, because we hadn't done it and #59 was merged a few weeks ago. I don't mean to put words in your mouth, but please understand that when you say something like that, it is perfectly reasonable that we will take offense to your words. The way your comment comes off can have just as much of an impact as what you actually write. A.S.A.P doesn't line up to "At the speed of sap" in terms of the initials so I didn't think you meant that. Sorry for the misunderstanding. |
It doesn't need to align, fully. The joke is in what "a.s.a.p" implies and what actually happens most of the time. |
now that jekyll supports
assets/
dir within theme gems,css/
and itscontents will be housed within minima's own
assets/
directoryRef: jekyll/jekyll#5402