Linking to external stylesheet from master page

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
DLL
Propeller Head
Posts: 19
Joined: Tue Sep 12, 2017 11:58 am

Linking to external stylesheet from master page

Post by DLL »

Hello,

I am planning on using a Google Font for the HTML output of my project, which will be published online exclusively. Hence, I wanted to use the method indicated by Google Fonts to link to their font in the HTML documents, that is, by adding a link to the font's stylesheet directly sourced from their server, like so:
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Font+Name">

I tried adding this tag inside the <head> wrapper of the master page used for my project's HTML output. However, it appears that Flare automatically removes whatever I add inside the <head> when building.

Does anyone know of a way to add a <link> tag to my project's HTML output without Flare removing it when building?

Thank you.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Linking to external stylesheet from master page

Post by NorthEast »

In your target you have presumably set a Master Stylesheet - but you also need to select Allow local stylesheets, otherwise all your other stylesheet links are removed from the output.

Also, the link is not valid XHTML as the tag isn't being closed - you need to have /> at the end; i.e.

Code: Select all

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Font+Name" />
DLL
Propeller Head
Posts: 19
Joined: Tue Sep 12, 2017 11:58 am

Re: Linking to external stylesheet from master page

Post by DLL »

Hi Dave. I forgot to mention: I am using MadCap Flare 11. Is this feature available in Flare 11? Because I do not see this option in my target properties.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Linking to external stylesheet from master page

Post by Nita Beck »

DLL wrote:Hi Dave. I forgot to mention: I am using MadCap Flare 11. Is this feature available in Flare 11? Because I do not see this option in my target properties.
That feature was added in Flare 12.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Linking to external stylesheet from master page

Post by NorthEast »

DLL wrote:Hi Dave. I forgot to mention: I am using MadCap Flare 11. Is this feature available in Flare 11? Because I do not see this option in my target properties.
No, it's not in v11.

So I'd advise that you don't set a master stylesheet in your target, and leave it as default.
Post Reply