Skip to content

Commit

Permalink
Merge pull request #119 from Lednerb/development
Browse files Browse the repository at this point in the history
Added configuration options to the style. Fixed font path issues. Fix…
  • Loading branch information
Lednerb authored Sep 15, 2018
2 parents c1438a3 + 10e4a60 commit 3296861
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.11.1] - 2018-09-15
### Fixed
- Broken font path since Version 1.10.0 (#114, #115)

## [1.11.0] - 2018-09-14
### Added
- Language Brazilian Portuguese, thanks to @marcelocg (#112)
- Updated Korean language


## [1.10.0] - 2018-09-10
### Fixed
- Incorrect rendering of task lists (#108)
Expand Down Expand Up @@ -161,7 +164,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Some typos


[Unreleased]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.11.0...master
[Unreleased]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.11.1...master
[1.11.1]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.11.0...1.11.1
[1.11.0]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.10.0...1.11.0
[1.10.0]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.9.1...1.10.0
[1.9.1]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.9.0...1.9.1
Expand Down
4 changes: 2 additions & 2 deletions assets/sass/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$fonts-folder: '/bilberry-hugo-theme/dist/fonts/';
$fonts-folder: '{{ .Site.BaseURL }}/dist/fonts/';

// Set the with of the main content area
// Notice that the actual content's width is $site-width - 100px
$site-width: 800px;
$site-width: {{ .Site.Params.SiteWidth | default "800px" }};

// Define your fonts.
// If you want to import new fonts, set them in /src/css/fonts.css
Expand Down
3 changes: 2 additions & 1 deletion assets/sass/theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "_variables";
// @import "_variables";
@import "externalDependencies";
@import "fontface";

Expand Down Expand Up @@ -29,6 +29,7 @@

.container {
width: $site-width;
max-width: 100%;
}

@import "topnav";
Expand Down
4 changes: 4 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ disqusShortname = "bilberry-hugo-theme"
# Set this option to false if you want to search within all articles in all languages at once
algolia_currentLanguageOnly = true

# Style configuration
# set the width of your site's content
siteWidth = "800px"

# Header configuration
# your subtitle if you want to use any
subtitle = "Hello World! This is the most epic subtitle ever."
Expand Down
9 changes: 6 additions & 3 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}

{{ $style := resources.Get "sass/theme.scss" | toCSS | minify | fingerprint }}
{{ $variables := resources.Get "sass/_variables.scss" | resources.ExecuteAsTemplate "sass/variables.scss" . }}
{{ $theme := resources.Get "sass/theme.scss" }}
{{ $combined := slice $variables $theme | resources.Concat "sass/combined.scss" }}
{{ $style := $combined | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}">

{{ partial "twitter-card" . }}
Expand Down Expand Up @@ -82,11 +85,11 @@
{{ end }}

{{ $js := resources.Get "js/externalDependencies.js" }}
{{ $secureJS := $js | resources.Fingerprint "sha512" }}
{{ $secureJS := $js | resources.Fingerprint "md5" }}
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>

{{ $jsTemplate := resources.Get "js/theme.js" }}
{{ $secureJS := $jsTemplate | resources.ExecuteAsTemplate "js/theme.js" . | fingerprint }}
{{ $secureJS := $jsTemplate | resources.ExecuteAsTemplate "js/theme.js" . | fingerprint "md5" }}
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>

<script>
Expand Down

0 comments on commit 3296861

Please sign in to comment.