Phlow / feeling-responsive

»Feeling Responsive« is a free flexible theme for Jekyll built on Foundation framework. You can use it for your company site, as a portfolio or as a blog.
http://phlow.github.io/feeling-responsive/
MIT License
901 stars 1.34k forks source link

Question Regarding caption_url Functionality #230

Closed Linux-Geezer closed 3 years ago

Linux-Geezer commented 3 years ago

I've been playing around with the Feeling Responsive theme in an attempt to try and learn how it works so I can modify it for my needs for my blog.

I'm trying to figure out how the "caption_url" in some of the Markdown files works. I would like to modify the functionality of the "caption_url" to open in a new tab/window instead of the same window.

Is the following function under the "javascript.js" file under the "assets/js" folder the mechanism that generates the caption link?

<! -- code --> caption : function (container, $image) { var caption = $image.attr('data-caption');

if (caption) { container .html(caption) .show(); } else { container .text('') .hide(); } return this; }, <! -- /code -->

TWiStErRob commented 3 years ago

https://github.com/Phlow/feeling-responsive/search?q=caption_url&type=

TWiStErRob commented 3 years ago

A blog post in _posts defines a layout in the _layouts folder mostly "page" which inherits from "default" which includes _masthead.html which has the condition to insert the header based on the page yaml metadata.

Phlow commented 3 years ago

Just edit this file › feeling-responsive/_includes/_masthead.html

and add target="_blank" :)

<a href="{{ page.header.caption_url }}" target="_blank">{{ page.header.caption }}</a>