too many files in resources directory #51
-
Hey there, I wanted to bring this to your attention. When I started using or tweaking something around this theme then the files under Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 11 replies
-
It is a naive and probably stupid solution to force clear out the browser's cache for websites using this theme when static resources like CSS files are updated. In file layouts/partials/head.html, a timestamp is used as part of the bundled file name, so browsers will always have the newest CSS and JavaScript code immediately every time we have a new release. {{ $hash := now.Unix }}
{{ $options := (dict "targetPath" (printf `minima.%d.css` $hash) "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $style := resources.Get "css/main.scss" | resources.ToCSS $options }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{ $options = (dict "targetPath" (printf `minima.%d.js` $hash) "minify" true) }}
{{ $js := resources.Get "js/main.js" | js.Build $options | resources.ExecuteAsTemplate (printf `minima.%d.js` $hash) . }}
<script defer type="text/javascript" src="{{ $js.RelPermalink }}"></script> This is something I need when I first made this theme, and now can be removed from Minima I guess. |
Beta Was this translation helpful? Give feedback.
-
Thanks @mivinci, The main reason for asking this because with the lot of files, it taking up space. When I'm running a big blog or a blog with multiple pages then the space will be quite high. $ du -d1 -h
8.0K ./archetypes
36K ./content
736K ./resources
4.0K ./static
4.0K ./data
852K ./themes
4.0K ./public
668K ./.git
4.0K ./layouts
2.3M . You can notice that Thanks a ton for the help. |
Beta Was this translation helpful? Give feedback.
-
Yea I can understand that it really is annoying since it takes up too much space in there. I'm pushing a commit to fix that right now. |
Beta Was this translation helpful? Give feedback.
-
Fixed with commit a0a8979 |
Beta Was this translation helpful? Give feedback.
-
Hey @mivinci sorry for disturbing you again but I think the issue remains the same. Please look at the attached screenshots. The rendering however is working fine. |
Beta Was this translation helpful? Give feedback.
-
Sure, Here's the markdown file the above document. In case this helps, here's the link to the website.
curl -sLS https://get.arkade.dev | sh
ark g minikube kubectl kubens
export PATH=$PATH:$HOME/.akrade/bin
source ~/.bashrc
$ vim ~/.config/fish/config.fish
$ mA Usecases
I've not configured anything from my side. |
Beta Was this translation helpful? Give feedback.
Fixed with commit a0a8979