Blog's tips/trick
Add excerpt to post
Automation: 25 first words in post (include words in header, so careful). You can change number of words by setting the FrontMatter variable
truncate_words
.
By hand (Recommended): Let excerpt is in <!--excerpt.start-->
and
<!--excerpt.end-->
Solution source: Detail
Custom FrontMatter variables in layout
Use layout.my_var
instead of page.my_var
because YAML FrontMatter var weren’t read inside a layout file.
Detail
Change theme color (global)
Edit color variable in minima.scss
Embed a Youtube video
Open a Youtube’s video. Click Share -> Embed, copy HTML code and paste it directly in markdown.
Example:
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/lFUlliTQEfk?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
Reponsive video
To fit a video size to screen, add a class="video"
in tag iframe
. After that, put all of it in a div
with class="youtube-video"
.
Example:
<div class="youtube-video">
<iframe class="video" width="560" height="315" src="https://www.youtube-nocookie.com/embed/lFUlliTQEfk?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
Result: