Search code examples
templatesikiwiki

Adding font links to ikiwiki template


I want to add the following to all the headers of all the HTML pages in my ikiwiki.

<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Romanesco">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800,400italic,600italic,700italic' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,600,700,800,400italic,600italic,700italic' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=PT+Sans:400,600,700,800,400italic,600italic,700italic' rel='stylesheet' type='text/css'/>

I tried to add those line in a custom templates/page.tmpl.mdwn but every time I deploy the wiki, those are not added.

What am I doing wrong?


Solution

  • In $git_repo/templates create a file called page.tmpl which is a copy of /usr/share/ikiwiki/templates/page.tmpl -- or where ever that file is in your local system.

    Then, you can modify $git_repo/templates/page.tmpl to add whatever you want.