Allow adding additional css/js files (#52)

This allows adding css/js files in .Site.Params.css/js both relative or
aboslute to the site.
The resulting html inserts absolute paths only.
master
Felix Bechstein 8 years ago committed by Calin Tataru
parent 335e9aa141
commit 8c38052502
  1. 4
      layouts/partials/css.html
  2. 2
      layouts/partials/js.html

@ -13,10 +13,10 @@
</style>
<!-- main -->
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/main.css">
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}">
<!-- custom -->
{{ range .Site.Params.css }} <link rel="stylesheet" href="{{ . }}"> {{ end }}
{{ range .Site.Params.css }} <link rel="stylesheet" href="{{ . | absURL }}"> {{ end }}
<!-- google fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ .Site.Params.font }}">

@ -10,7 +10,7 @@
{{ end }}
<!-- custom -->
{{ range .Site.Params.js }} <script src="{{ . }}"></script> {{ end }}
{{ range .Site.Params.js }} <script src="{{ . | absURL }}"></script> {{ end }}
<!-- jquery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

Loading…
Cancel
Save