Create Custom Hugo Shortcodes

Shortcodes in Hugo are basically chunks of HTML code that can be used in our content files. You can use built-in shortcodes like youtube or create your own. Create custom shortcode Here are the basic steps to create your own custom shortcode: Create a file layouts/shortcodes/shortcode_name.html Add your HTML code to the shortcode_name.html file Call your shortcode with {{< shortcode_name >}} Shortcode example Let's create a simple Hugo shortcode that displays the temperature:...

April 17, 2023 · 2 min · 419 words · Altynbek Usenbekov

Deploying a Hugo Website with Firebase Hosting: A Step-by-Step Guide

Hugo is a fast and modern static site generator written in Go, and designed to make website creation fun again. Hugo is a general-purpose website framework. Once we are ready to publish we can run the hugo command and it generates a static site that we can deploy. All the files needed for deployment will be located in the public directory and consists of various files such as HTML, CSS, JavaScript, and more....

April 17, 2023 · 4 min · 773 words · Altynbek Usenbekov

Hugo YouTube Shortcode

Shortcodes in Hugo are basically chunks of HTML code that can be used in our content files. We can create our shortcode or use existing built-in shortcodes. For instance, to embed a YouTube video, we can use the built-in shortcode called youtube. Here is how to use the youtube shortcode: {{< youtube VIDEO-ID >}} or {{< youtube id="VIDEO-ID" >}} This will embed a responsive video player for the given YouTube video....

April 16, 2023 · 3 min · 520 words · Altynbek Usenbekov

How to Enable Impeller in Flutter

Impeller is a new rendering runtime for Flutter. It precompiles a smaller, simpler set of shaders at Engine build time so that they won’t be compiled while an app is running. It takes full advantage of modern hardware-accelerated graphics APIs such as Metal on iOS and Vulkan on Android. Running with Impeller You can run with Impeller by passing --enable-impeller to the flutter run command like this: flutter run --enable-impeller Enabling Impeller in Flutter Impeller is currently available for preview on iOS on the master channel....

April 13, 2023 · 1 min · 160 words · Altynbek Usenbekov

How to Change the Voice of SpeechSynthesis with JavaScript?

SpeechSynthesis is used to read text out loud on web browsers using JavaScript, provided that the browser supports Text-to-Speech. It is a component of the Web Speech API, which includes SpeechSynthesis (Text-to-Speech) and SpeechRecognition (Asynchronous Speech Recognition). How to change the voice Usually, platforms provide a list of voice options, and we can select one of those voices for the speech. The available voices may depend on the operating system and browser....

April 12, 2023 · 2 min · 286 words · Altynbek Usenbekov