How can I change the subtitle to only show a selected amount of words? #1516
-
Checklist
How did you create the site?Generated from DescriptionI want the subtitle to only show like half of the words, just the first line in the article if it's possible. Operations you have already triedI tried to put subtitle: and the phrase that I wanted to show, Anything else?No response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It may not be so easy to display only a certain number of words while making sure they all fit on a single line, because this theme supports responsive design. But something can be done. If I understand you correctly, you want to display only a single line. This can be done by overriding the styles in `assets\css\jekyll-theme-chirpy.scss' like this
%text-clip {
-webkit-line-clamp: 1;
}
%text-clip {
-webkit-line-clamp: 1;
white-space: nowrap;
} |
Beta Was this translation helpful? Give feedback.
It may not be so easy to display only a certain number of words while making sure they all fit on a single line, because this theme supports responsive design.
But something can be done. If I understand you correctly, you want to display only a single line. This can be done by overriding the styles in `assets\css\jekyll-theme-chirpy.scss' like this