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

Customize placement of "Read More" #116

Closed
rpodcast opened this issue Jun 2, 2017 · 6 comments
Closed

Customize placement of "Read More" #116

rpodcast opened this issue Jun 2, 2017 · 6 comments
Assignees

Comments

@rpodcast
Copy link
Contributor

rpodcast commented Jun 2, 2017

I really like the Read More feature when rendering the episode descriptions in the episode rows. For some of my episode descriptions I'd like to insert the Read More prompt earlier than the 600 character mark (I believe I'm interpreting that limit correctly when viewing the row.html partial. I can think of a couple of ways to accomplish this:

  • Add an optional configuration parameter for an episode to override this value
  • Make use of some special variable that could be inserted in the episode's description text to indicate where to put the Read More link (something like a wildcard)

Certainly not an urgent feature but down the road it might be nice to have it.

@mattstratton
Copy link
Owner

I can definitely see where it would be useful to set your own truncate value; it should be fairly trivial to do (the truncate code is super simple compared to how I was doing it in another theme), so I'll we'll work on it!

@mattstratton
Copy link
Owner

Okay I read this again, and I misunderstood the requirement. You would like more control over where the summary occurs. I believe there is a way to handle this natively in Hugo; I'll dig into it. The issue that I think occurs is that the "summary" won't show up (or it does show up, I don't recall) in the description.

I understand that a 600 character truncate on description is opinionated (and was arbitrary) so maybe it can be something that is optional per epiosde. I also wonder if your description is over this amount if it's took long in general :)

@rpodcast
Copy link
Contributor Author

rpodcast commented Jun 5, 2017

I had some time to think more about it. For one case, it would be great to just be able to customize the 600 limit on a per-episode basis. Though my other want would be to enable the "Read More" link to appear after the entire episode description, no matter how many characters it happens to be. That would make it a convenient way for the user to bring up the detailed notes right after reading the description. Might be too esoteric so I understand if that's not what you plan to build in.

FYI I finally got my site up-to-date with your lastest-ish theme files and it looks fantastic! Head to https://r-podcast.org/ if you want to have a look (repo is here). Thanks again for your awesome work on this theme.

@mattstratton
Copy link
Owner

FYI I finally got my site up-to-date with your lastest-ish theme files and it looks fantastic!

Looks great! Amusingly enough, I added the "list of guests" page to the theme today, before looking at your site. Great minds think alike!

@mattstratton
Copy link
Owner

So thinking this through...the idea is that there is a new frontmatter element like this:

+++
Description = "Seed money learning curve client beta accelerator handshake non-disclosure agreement pitch startup burn rate early adopters innovator. Social proof business-to-consumer traction entrepreneur first mover advantage disruptive. Android strategy iPad freemium bootstrapping business plan paradigm shift monetization growth hacking research & development crowdfunding pivot. Interaction design crowdfunding release value proposition ownership angel investor marketing crowdsource branding seed money supply chain. Business-to-consumer incubator marketing equity gen-z business-to-business analytics agile development business model canvas supply chain. Focus holy grail business-to-consumer marketing beta advisor funding. Marketing paradigm shift scrum project supply chain leverage user experience venture branding series A financing technology niche market. Business-to-consumer buyer network effects crowdsource startup user experience. Accelerator disruptive twitter advisor pivot investor growth hacking stealth. Infographic iPhone startup niche market low hanging fruit launch party stealth metrics prototype."
author = "Matt"
date = "2016-04-25T04:09:45-05:00"
episode = "7"
episode_image = "img/episode/april.jpg"
explicit = "no"
guests = ["jdoe", "jsmith"]
images = ["http://www.google.comimg/episode/default-social.jpg"]
podcast_duration = "1:08:22"
podcast_file = "arrested-devops-podcast-episode053.mp3"
title = "april fools"
youtube = "X56Bt2zDNyA"
truncate = "600"

+++

And it will truncate that particular episode at that level.

I'm wondering if it's better to make this a global configuration value; rather than doing it on a per-episode basis (having done 85 episodes of ADO, I can't imagine trying to puzzle out where I want it to cut off for each one) but rather saying "OK, Matt, I see why you like it to truncate at 600 runes, but I prefer 900". So if it's set in config.toml, it uses that value, but if not, it uses the default. I think that would be simpler.

I suppose it would be possible to do both, as well...allow a global override, but also a per-episode override? Thoughts?

@rpodcast
Copy link
Contributor Author

Hey sorry for getting back to you late on this. Ideally I'd prefer both ways (global override but also an optional per-episode option in the frontmatter). I certainly don't want to force others (especially yourself) to have to make this config in each episode's options retroactively!

@mattstratton mattstratton changed the title [Enhancement] Customize placement of "Read More" Customize placement of "Read More" Jun 13, 2017
@mattstratton mattstratton self-assigned this Jun 13, 2017
@ghost ghost removed the needs-review label Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants