How to add Google web font css to Grails resources

642 Views Asked by At

What is the right way to add a Google web font css dependency to a grails app using the resources plugin?

For some reason, the grails resources plugin seems to want to remove the query string.

modules = {
    mainLayout {
        dependsOn 'bootstrap-css,bootstrap-responsive-css,bootstrap-dropdown'
        resource url: 'css/main.css'
        resource url: 'http://fonts.googleapis.com/css?family=Snowburst One', attrs: [type: "css"]
    }
}

The HTML has this:

1

There are 1 best solutions below

0
On

Include the link to the web font a pi in your main layout file:

<link href='http://fonts.googleapis.com/css?family=.../>