Comments (7)
Another, perhaps better solution, is to look for a 'description' field in the post Front Matter. If it does not exist, carry on as usual, if it does exist however, use it in the related-posts (Further Reading) sections, and also in the descriptive blurb in the home page.
So the code might go from this:
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 200 | escape }}
to this:
(% if post.description %}
{{ post.description | markdownify | strip_html | truncate: 200 | escape }}
{% else %}
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 200 | escape }}
{% endif %}
from jekyll-theme-chirpy.
I think it's a great feature to have a description
field in the front matter, as it can help work around this problem as well as #1516.
I would like to have this feature for my posts as well, to have control over the post description that appears in multiple places. I will work on it.
P.S. The originally reported issue should be fixed separately and I see no proper way to handle it so far.
from jekyll-theme-chirpy.
Related Issues (20)
- Dynamicaly switch logo based on mode-toggle HOT 2
- Add a newsletter form HOT 4
- PageView counter at top of the posts using Goatcounter HOT 3
- Error could not find gem `sass-embedded' when executing bundle HOT 9
- Restrict Giscus Origins HOT 5
- Wrong image paths in v6.5.0 HOT 3
- Cannot switch dark/light mode of the website HOT 6
- "Next" and "Previous" buttons HOT 3
- Github Pages deploy error, HTML-Proofer, custom domain? HOT 6
- Github Pages Chirpy Starter Missing Assets
- When using a CDN ( img_cdn ), clickable images doesn't adhere to the CDN settings HOT 3
- Pageviews regression in 6.5.2 gem HOT 2
- default layout should pass lang=lang as parameter to search-loader.html HOT 2
- Github Pages deploy error HOT 2
- Customize font-familiy with Chirpy Starter template? HOT 1
- Lack of Ρlear update flow to new version HOT 4
- Failed to customize font-familiy with Chirpy Starter HOT 2
- code block seems to not be compatible with omnivore parser
- Visual text glitches in the sidebar that disappear on hover HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jekyll-theme-chirpy.