` tag. This is the underlying markup rendered by markdown blockquotes. ```html``` -------------------------------- ### Build Hugo Website for Deployment Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/basics/installation/_index.en.md Command to build the static files for a Hugo website. This generates a 'public' folder containing all assets ready for deployment on any web server. ```bash hugo ``` -------------------------------- ### Display current execution path Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/layouts/shortcodes/common/Installjq.md This command displays the current value of the PATH environment variable, which lists the directories where the system looks for executable files. ```bash echo $PATH ``` -------------------------------- ### Markdown Syntax Highlighting (JavaScript) Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/cont/markdown.en.md Explains and demonstrates GitHub Flavored Markdown (GFM) for syntax highlighting within code blocks. This example specifically shows JavaScript syntax highlighting. ```javascript grunt.initConfig({ assemble: { options: { assets: 'docs/assets', data: 'src/data/*.{json,yml}', helpers: 'src/custom-helpers.js', partials: ['src/partials/**/*.{hbs,md}'] }, pages: { options: { layout: 'default.hbs' }, files: { './': ['src/templates/pages/index.hbs'] } } } }; ``` -------------------------------- ### Display a Tip Disclaimer using Notice Shortcode Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/shortcodes/notice.en.md This code example illustrates the usage of the notice shortcode to create a 'tip' disclaimer. It's useful for providing helpful suggestions or best practices. ```Go Template {{%/* notice tip */%}} A tip disclaimer {{%/* /notice */%}} ``` -------------------------------- ### Markdown Blockquote Example Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/cont/markdown.en.md Demonstrates how to use markdown's blockquote syntax (`>`) to quote content from another source. This is useful for highlighting external information or references within your document. ```markdown > **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. ``` -------------------------------- ### Configure Hugo Theme and Search Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/basics/installation/_index.en.md TOML configuration for a Hugo website. Sets the default theme to 'hugo-theme-learn' and enables search functionality by defining output formats for the home page. ```toml # Change the default theme to be use when building the site with Hugo theme = "hugo-theme-learn" # For search functionality [outputs] home = [ "HTML", "RSS", "JSON"] ``` -------------------------------- ### Create New Hugo Content Page Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/basics/installation/_index.en.md Commands to create new content pages within a Hugo project. The first creates a standard content page, and the second creates a content page that acts as an index for a section. ```bash hugo new basics/first-content.md hugo new basics/second-content/_index.md ``` -------------------------------- ### Attachments Shortcode with Colored Styles Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/shortcodes/attachments.en.md The Attachments shortcode supports different visual styles for the displayed list. This example shows how to apply 'orange', 'grey', 'blue', and 'green' styles using the 'style' parameter. ```Go Template {{%/*attachments style="orange" /*/%}} ``` ```Go Template {{%/*attachments style="grey" /*/%}} ``` ```Go Template {{%/*attachments style="blue" /*/%}} ``` ```Go Template {{%/*attachments style="green" /*/%}} ``` -------------------------------- ### Markdown Basic Image Insertion Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/cont/markdown.fr.md Demonstrates the basic syntax for embedding an image in Markdown. It uses an exclamation mark followed by alt text in square brackets and the image URL in parentheses. Renders the image directly. ```markdown  ``` ```markdown  ``` ```htmlFusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
``` -------------------------------- ### Markdown Image Resizing with URL Parameters Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/cont/markdown.fr.md Explains how to resize images in Markdown by appending `width` and/or `height` parameters with CSS values to the image URL. This allows for controlling the display size of the image directly within the Markdown. ```markdown  ``` ```markdown  ``` ```markdown  ``` -------------------------------- ### Build and Deploy Blue Car Application using Bash Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/content/Well-Architected-Partners/100_Labs/100_Automating_Serverless_Best_Practices_with_Dashbird/1_deploy_blue_car_application.md This script navigates to the application directory and executes the build script to deploy the Blue Car application. The deployment process may take a significant amount of time to complete. ```bash cd aws-well-architected-labs/static/wapartners/100_Automating_Serverless_Best_Practices_with_Dashbird/Code/oncall-health-sample-app bash build_script.sh ``` -------------------------------- ### Install/Upgrade AWS CLI v2 (Linux) Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/layouts/shortcodes/common/InstallAWSCLIv2.md Installs or upgrades the AWS CLI v2 on Linux systems. It downloads the installer, unzips it, and then runs the installation script with the update flag. This requires `curl` and `unzip` to be installed. ```bash curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install --update ``` -------------------------------- ### Verify AWS CLI Version (Linux) Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/layouts/shortcodes/common/InstallAWSCLIv2.md Checks the currently installed version of the AWS CLI. This command is useful to determine if an upgrade is necessary. ```bash aws --version ``` -------------------------------- ### Nested Markdown Blockquote Example Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/cont/markdown.en.md Illustrates how to create nested blockquotes in markdown by indenting subsequent quote lines. This allows for hierarchical quoting structures. ```markdown > Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. > > > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. > > Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus. ``` -------------------------------- ### Include File with Line Number Highlighting Options Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/layouts/shortcodes/readfile.html This shortcode demonstrates including a file with advanced syntax highlighting options, such as specifying line numbers to be highlighted and the starting line number. The 'highlightopts' parameter controls these settings. ```gohtml {{< readfile file="example.py" code="true" lang="python" highlightopts="linenos=table,hl_lines=8 15-17,linenostart=199" >}} ``` -------------------------------- ### Markdown Comments to HTML Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/cont/markdown.fr.md Illustrates how to create HTML comments in Markdown. These comments are not rendered in the final output, serving as notes within the source code. ```html ``` -------------------------------- ### Tag and Push Repository for Release Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/README.md Commands to tag a new release and push the tag to the origin repository. This is a step in the release process for the Hugo Learn Theme. ```shell git tag
git push origin ``` -------------------------------- ### Manually Create AWS Credentials File Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/content/common/documentation/AWS_Credentials.md This snippet details the manual creation of the `credentials` file within the `~/.aws` directory. It specifies the format for storing AWS access key ID and secret access key under the `[default]` profile. This method is an alternative when the AWS CLI is not available or preferred. ```bash mkdir ~/.aws cd ~/.aws # Use a text editor (vim, emacs, notepad) to create a text file (no extension) named "credentials". # In this file you should have the following text: [default] aws_access_key_id = aws_secret_access_key = ``` -------------------------------- ### Generate Release with Gren Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/README.md Command to generate a new release on platforms like GitHub using the 'gren' tool, specifying the tag for the release. ```shell gren release -t ``` -------------------------------- ### Display Button Text (Go Template) Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/layouts/shortcodes/email_button.html Renders button text, prioritizing a 'button_text' parameter. If not provided, it falls back to the 'button_text_backup' scratch variable. ```go-template {{ if .Get "button_text" }}{{.Get "button_text" }}{{else}}{{$.Scratch.Get "button_text_backup" }}{{ end }} ``` -------------------------------- ### Markdown Body Copy to HTML Paragraphs Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/cont/markdown.fr.md Explains how plain text in Markdown is converted into HTML paragraphs (` `). This is the standard way to format blocks of text. ```markdown Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad. ``` ```html
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
``` -------------------------------- ### Include Basic Markdown Image Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/cont/markdown.en.md Markdown images are similar to links but start with an exclamation point. They require an alt text and the image URL. This is used to embed images directly into documentation. ```markdown  ``` -------------------------------- ### Include Go Code File with Syntax Highlighting Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/layouts/shortcodes/readfile.html This shortcode includes a Go language file from the same directory as the parent file and applies syntax highlighting. The 'code="true"' flag enables highlighting, and 'lang="go"' specifies the language. ```gohtml {{< readfile file="code-written-in.go" code="true" lang="go" >}} ``` -------------------------------- ### Activate Search with Hugo Outputs Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/basics/configuration/_index.en.md This snippet demonstrates how to activate the search functionality in Hugo-theme-learn by configuring the `outputs` section in `config.toml`. This enables the generation of an `index.json` file, which is used by the lunr.js search engine. ```toml [outputs] home = [ "HTML", "RSS", "JSON"] ``` -------------------------------- ### Include File from Site BaseURL Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/layouts/shortcodes/readfile.html This shortcode shows how to include a file using a path relative to the site's baseURL. It requires a leading forward slash in the 'file' parameter and is useful for files not directly related to the current content's directory structure. ```gohtml {{% readfile file="/docs/one-or-more-sub-directories/example-source-file.md" %}} ``` -------------------------------- ### Markdown Horizontal Rules to HTML Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/themes/learn/exampleSite/content/cont/markdown.fr.md Shows the different ways to create horizontal rules (`
`) in Markdown using underscores, dashes, or asterisks. These create thematic breaks in content. ```markdown ___ --- *** ``` -------------------------------- ### Manually Create AWS Config File Source: https://github.com/awslabs/aws-well-architected-labs/blob/main/content/common/documentation/AWS_Credentials.md This snippet illustrates the manual creation of the `config` file within the `~/.aws` directory. It defines the default region and output format for AWS CLI operations. This file complements the `credentials` file for manual AWS configuration. ```bash # Use a text editor (vim, emacs, notepad) to create a text file (no extension) named "config". # In this file you should have the following text: [default] region = us-east-2 output = json ```