Skip to content

Commit

Permalink
Merge pull request #47 from jiakai-17/master
Browse files Browse the repository at this point in the history
fix: Attempt to fix broken paths on GitHub Pages
  • Loading branch information
freshcabbage123 authored Oct 4, 2023
2 parents eeb48c4 + 94bd59f commit b11c48f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion docs/_includes/admonition.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<!-- Original by Adam Douglas (https://www.adamsdesk.com/posts/admonitions-jekyll/), reused with modifications. -->
{% if false %}
<!-- These comments are wrapped in an if block to prevent these comments from being rendered on GitHub Pages. -->
<!-- Solution below adapted from Adam Douglas (https://www.adamsdesk.com/posts/admonitions-jekyll/), reused with modifications. -->
{% endif %}

{% if include.type.size > 0 and include.title.size > 0 %}
{% assign types = "note, abstract, info, tip, success, question, warning, failure, danger, bug, example, quote" | split: ", " %}
{% if types contains include.type and include.body.size > 0 %}
Expand Down
5 changes: 3 additions & 2 deletions docs/_sass/admonition.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ $admonitions:
}
}
.admonition.#{$name} .admonition-title::before {
-webkit-mask: url("/assets/img/icons/#{$icon}") no-repeat 50% 50%;
mask: url("/assets/img/icons/#{$icon}") no-repeat 50% 50%;
// Adapted from: https://stackoverflow.com/a/39156436
-webkit-mask: url($baseurl + "/assets/img/icons/#{$icon}") no-repeat 50% 50%;
mask: url($baseurl + "/assets/img/icons/#{$icon}") no-repeat 50% 50%;
@if $icon-color {
background-color: #{$icon-color};
}
Expand Down
3 changes: 3 additions & 0 deletions docs/assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Only the main Sass file needs front matter (the dashes are enough)
---

// Adapted from: https://stackoverflow.com/a/39156436
$baseurl: "{% if site.baseurl != '/' %}{{ site.baseurl }}{% endif %}";

@import
"minima/skins/{{ site.minima.skin | default: 'classic' }}",
"minima/initialize",
Expand Down

0 comments on commit b11c48f

Please sign in to comment.