-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Edge Case: _collections bug (solved) #59
Comments
Since the page meta only shows if You could put it in all of their YAML Front Matter or use front matter defaults in your |
I thought that there was a setting like that, but I am new to yaml so I wasn't sure and I couldn't find it when I did a lazy look on the internet. That's not the main reason I fixed the code, my main reason was the issue with the collections, but there are a few things I'd like to fix. |
The You have valid point about moving |
I just figured out that I did not put my code in the right spot, it should be below Also, glad you fixed the footer. I will have to look into adding that to my code. But I am still looking to figure out everything with inner. I still think it is too opinionated and makes you have to write too much duplicate code. At the very least, the inner used on the canvas should be renamed so that if we have to keep that that we can at least not be required to include it in our layouts for every single page. |
All my themes are opinionated. They were made for me at some point. |
This issue has been automatically marked as stale because it has not had recent activity. If this is a bug and you can still reproduce this error on the If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial. This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions. |
So I have been working on adapting this theme to my needs, and I found a slight bug in the theme (or in Jekyll itself, how you like), the issue is that when you create a collection and you use the Boolean
output: true
which will create a hyperlink/permalink based on title: it also creates an invisible date. That date is then seen by the page-intro.html 'page.date` IF statement and thus all of my collection html pages had an author name, date of creation and read time. Not what I needed.In theory, there should not be been an IF statement created for the blog meta since there is only one case when you want it to be posted, which is on the articles themselves.
Solving the issues required some working out of the code. I first broke down the page-intro.html into component parts.
I did this in order to isolate the page-meta.html.
I then took the common code along with my new pages and added it to default.html in _layouts:
At this point this was my page.meta.html file.
After that I needed to create an if statement to only add the meta file if it was a post. So I added this around the include (page.layout == 'post'):
Which says if this is a post, add this.
The other problem I had was that the CV file has it's own intro.html file which mimics a lot of the page-intro.html file, but changes the title filter to include the json title filter. I ended up removing that file entirely from the control flow and took the parts that were necessary and included them back into the default.html. I mainly took the includes out of the CV.html _layout file like this. heads-up: The {% include cv/intro.html %} was removed.
I was then able to create an IF statement that would only show the CV title when it was actually the CV page. I also made an if statement for the CV subtitle filter that included an AND statement (see below). I know it seems like a lot, but in the end it works. Here is the new default.html. (one other thing of importance- I needed to re-add the variable {% assign cv = site.data.cv %} to the default.html file above the CV title string for this to work): My new code begins on like 43 just below:
<div class="initial-content">
and ends on line 73 in the default.html file.The text was updated successfully, but these errors were encountered: