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

Cannot add upcoming talks #56

Closed
nisrulz opened this issue Dec 31, 2019 · 12 comments
Closed

Cannot add upcoming talks #56

nisrulz opened this issue Dec 31, 2019 · 12 comments
Labels
enhancement New feature or request

Comments

@nisrulz
Copy link
Contributor

nisrulz commented Dec 31, 2019

Basically, what it means is ability to add talks that will be happening in the future i.e are upcoming.

Usually speakers would get selected and will have a talk in a few months. This will allow them to list those talks up on the page too.

Thank you!

@zzossig
Copy link
Owner

zzossig commented Jan 1, 2020

Edit: I found that we can solve the problem by setting another front matter - publishDate
Update the Zzo theme first and then follow the below steps.

  1. add config variable named buildFuture at root/config/_default/config.toml
...
buildFuture = true
...
  1. add publishDate front matter to your md file at root/content/talks/myLinks.md
---
title:
date:
publishDate: 2020-02-20
...
---
...
  1. I added one more param(root/config/_default/params.toml)
...
talksPaginate = 5
talksGroupByDate = "2006"
...

That's it.

@zzossig zzossig added the enhancement New feature or request label Jan 1, 2020
@nisrulz
Copy link
Contributor Author

nisrulz commented Jan 1, 2020

This works! Thank you 👍

Quick question: Why is the publishDate date required? Everything works the same with date.

Inside md file at root/content/talks/myLinks.md

@zzossig
Copy link
Owner

zzossig commented Jan 1, 2020

We are using ‘date’ front matter for sorting list in the home page, terms page, section page.

So if we use the ‘date’ for talks page, it will show up at the top of the home page unnecessarily.

But you can use ‘date’ if you don’t mind the sorting problem

@nisrulz
Copy link
Contributor Author

nisrulz commented Jan 1, 2020

That makes sense. I was actually going to ask about those showing up on the home page. I will make the fix so they don't show.

Thank you for explaining it to me.

@nisrulz nisrulz closed this as completed Jan 1, 2020
@zzossig
Copy link
Owner

zzossig commented Jan 1, 2020

Oh, you don’t want the talks showing up on the home page? Actually it was not displayed on the home page but I deleted that part. I’ll rollback that code.

Or you can do PR . This is the related commit 9c21e92

@nisrulz
Copy link
Contributor Author

nisrulz commented Jan 1, 2020

That would be nice.

Essentially this is a blog. So only posts should show up on the home page. Anything else should show in its own page.

@zzossig
Copy link
Owner

zzossig commented Jan 1, 2020

Yes I misunderstood some words.

@nisrulz
Copy link
Contributor Author

nisrulz commented Jan 1, 2020

I think you meant this commit: 9c21e92

Maybe what would be better is to have it behind a flag. This would make it dynamic and you don't need to filter it.

So putting in a config, which by default does not show in home page, but when set to true will show in home page. It can be any page.

@nisrulz
Copy link
Contributor Author

nisrulz commented Jan 1, 2020

..or it can be a field that takes an array. i.e

showInHomePageTypes = [posts, talks]

This way if someone doesn't want to show talks they just set it to:

showInHomePageTypes = [posts]

and your logic would be something like:

if (pageType is in showInHomePageTypes array){
      then show in home page
}

What do you think?

@zzossig
Copy link
Owner

zzossig commented Jan 1, 2020

I’ll think about it more.
But if we add this feature, ‘dontShowInHomePage’ would be better name I think.

@nisrulz
Copy link
Contributor Author

nisrulz commented Jan 1, 2020

dontShowInHomePage also works 👍

@nisrulz nisrulz reopened this Jan 1, 2020
@zzossig
Copy link
Owner

zzossig commented Jan 1, 2020

No add new issue . It’s better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants