You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This modification to the chirpy theme will enable code blocks that specify a filename to optionally specify a URL that turns the rendered filename into a link that opens in a new tab/page if a link is external or same page if anchor/relative.
Then, copy the default stylesheet jekyll-theme-chirpy.scss to your project in the same location (/assets/css/jekyll-theme-chirpy.scss) and add the following block:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
This modification to the chirpy theme will enable code blocks that specify a filename to optionally specify a URL that turns the rendered filename into a link that opens in a new tab/page if a link is external or same page if anchor/relative.
Usage in chirpy markdown post:
Setup
Add
refactor-content.html
to your project's_includes
folder.In the
<!-- Add header for code snippets -->
section replace everything between{% if _left contains 'file="' %}
and{% assign _new_content = _new_content
with the following block:Then, copy the default stylesheet
jekyll-theme-chirpy.scss
to your project in the same location (/assets/css/jekyll-theme-chirpy.scss
) and add the following block:Beta Was this translation helpful? Give feedback.
All reactions