CORS and Polish lang (#126)

I propose adding `crossorigin=anonymous`  for signed stylesheets to allow for CORS policy. 

Practical example - I keep my web page in S3 bucket and redirect both naked domain and www domain into the same bucket (this is rare scenario - most people duplicate buckets). 

So I had to enable CORS like in [this article](https://medium.com/@Keithweaver_/only-allowing-access-to-your-s3-bucket-via-your-website-5ca5c8546152) However CORS cannot be used without crossorigin=anonymous set. (explained [here](https://stackoverflow.com/questions/32039568/what-are-the-integrity-and-crossorigin-attributes)

Also added pl.toml for Polish language.
This commit is contained in:
Robert J 2019-01-25 15:31:09 +01:00 committed by Hanzei
parent 5bba25cd16
commit 9b49548467
3 changed files with 28 additions and 3 deletions

25
i18n/pl.toml Normal file
View file

@ -0,0 +1,25 @@
[404_title]
other = "404"
[404_description]
other = "Oops! Ta strona nie istnieje! Albo trafiłeś na błąd {{ with .Site.Params.email }} (w takim wypadku, [powiadom mnie](mailto:{{ . }}) ) {{ end }} albo próbujesz wejść na stronę, której nie ma."
[index_projects_allProjects]
other = "Wszystkie projekty"
[index_blog_latestPosts]
other = "Ostatnie posty"
[index_blog_allPosts]
other = "Wszystkie posty"
[index_blog_readMore]
other = "Więcej"
[index_currentTime]
other = "Mój lokalny czas to"
[nav_backToSection]
other = "Wróć do {{ .Title }}"
[nav_main]
other = "główna"
[blog_readingTime]
one = "{{ .Count }} minut"
other = "{{ .Count }} minut"
[blog_shareThis]
other = "Podziel się"
[footer_text]
other = "[**Introduction**](https://github.com/vickylai/hugo-theme-introduction/) szablon dla [Hugo](http://gohugo.io/). Stworzony z [<i class=\"fa fa-heart\"></i> i <i class=\"fa fa-coffee\"></i>](https://vickylai.com) przez społeczność open source."

View file

@ -1,4 +1,4 @@
{{ $owlCarousel := resources.Get "vendor/owlCarousel/owl.carousel.min.css" }} {{ $owlCarousel := resources.Get "vendor/owlCarousel/owl.carousel.min.css" }}
{{ $owlCarouselTheme := resources.Get "vendor/owlCarousel/owl.theme.default.min.css" }} {{ $owlCarouselTheme := resources.Get "vendor/owlCarousel/owl.theme.default.min.css" }}
{{ $owlCarouselBundle := slice $owlCarousel $owlCarouselTheme | resources.Concat "/styles/owlCarousel.min.css" | fingerprint }} {{ $owlCarouselBundle := slice $owlCarousel $owlCarouselTheme | resources.Concat "/styles/owlCarousel.min.css" | fingerprint }}
<link rel="stylesheet" href="{{ $owlCarouselBundle.Permalink }}" integrity="{{ $owlCarouselBundle.Data.Integrity }}" media="screen"> <link rel="stylesheet" href="{{ $owlCarouselBundle.Permalink }}" integrity="{{ $owlCarouselBundle.Data.Integrity }}" crossorigin="anonymous" media="screen">

View file

@ -8,11 +8,11 @@
{{ $cssOpts := (dict "targetPath" "/css/main.css" ) }} {{ $cssOpts := (dict "targetPath" "/css/main.css" ) }}
{{ $postCSSOpts := (dict "use" "autoprefixer" ) }} {{ $postCSSOpts := (dict "use" "autoprefixer" ) }}
{{ $bundle := $bundleRaw | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }} {{ $bundle := $bundleRaw | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }}
<link rel="stylesheet" href="{{ $bundle.Permalink }}" integrity="{{ $bundle.Data.Integrity }}" media="screen"> <link rel="stylesheet" href="{{ $bundle.Permalink }}" integrity="{{ $bundle.Data.Integrity }}" crossorigin="anonymous" media="screen">
{{ end }} {{ end }}
<!-- Custom css --> <!-- Custom css -->
{{ range .Site.Params.customCSS -}} {{ range .Site.Params.customCSS -}}
{{ $style := resources.Get . }} {{ $style := resources.Get . }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" media="screen"> <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" media="screen">
{{- end }} {{- end }}