Referencing a CSS External Style Sheet file in Twiki

41 Views Asked by At

Is there any standard place and way to define a css file and reference it in some of the pages of a subsite?

The following code works, but having an absolute path and an arbitrary location doesn't seems to be a good solution (specially when we are dealing with hundreds of topics.

<link rel="stylesheet" type="text/css" href="PATH_TO_FILE/mystyle.css">
1

There are 1 best solutions below

0
On

Attaching your CSS file at any page and referencing it by appending /pub/%WEB%/Webhome/ to the path works. Maybe not a standard solution, but still works.

<link rel="stylesheet" type="text/css" href="/pub/%WEB%/Webhome/mystyle.css">