Syntax

Markdown Configure Markup-Imgae and Video

Markdown Configure Markup-Imgae and Video

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
Emphasis

Emphasis, aka italics, with asterisks or underscores.

Strong emphasis, aka bold, with asterisks or underscores.

Combined emphasis with asterisks and underscores.

Strikethrough uses two tildes. Scratch this.

I’m an inline-style link

I’m an inline-style link with title

I’m a reference-style link

I’m a relative reference to a repository file

You can use numbers for reference-style link definitions

Or leave it empty and use the link text itself.

URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com or http://www.example.com and sometimes example.com (but not on Github, for example).

Some text to show that the reference links can follow later.

Paragraph

Lorem ipsum dolor sit amet consectetur adipisicing elit. Quam nihil enim maxime corporis cumque totam aliquid nam sint inventore optio modi neque laborum officiis necessitatibus, facilis placeat pariatur! Voluptatem, sed harum pariatur adipisci voluptates voluptatum cumque, porro sint minima similique magni perferendis fuga! Optio vel ipsum excepturi tempore reiciendis id quidem? Vel in, doloribus debitis nesciunt fugit sequi magnam accusantium modi neque quis, vitae velit, pariatur harum autem a! Velit impedit atque maiores animi possimus asperiores natus repellendus excepturi sint architecto eligendi non, omnis nihil. Facilis, doloremque illum. Fugit optio laborum minus debitis natus illo perspiciatis corporis voluptatum rerum laboriosam.

List
  1. List item
  2. List item
  3. List item
  4. List item
  5. List item
Unordered List
  • List item
  • List item
  • List item
  • List item
  • List item
Code and Syntax Highlighting

Inline code has back-ticks around it.

var s = "JavaScript syntax highlighting";
alert(s);
s = "Python syntax highlighting"
print s
No language indicated, so no syntax highlighting. 
But let's throw in a <b>tag</b>.
Blockquote

This is a blockquote example.

Inline HTML

You can also use raw HTML in your Markdown, and it’ll mostly work pretty well.

Tables

Colons can be used to align columns.

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don’t need to make the raw Markdown line up prettily. You can also use inline Markdown.

Markdown Less Pretty
Still renders nicely
1 2 3
Image
![image](../../images/post/post-1.jpg)

or

![image](/images/post/post-1.jpg)

Image Markdown example:

![Text](https://d33wubrfki0l68.cloudfront.net/c38c7334cc3f23585738e40334284fddcaf03d5e/2e17c/images/hugo-logo-wide.svg "Title")

Here is a code example for how the render-image.html template could look: layouts/_default/_markup/render-image.html

<p class="md__image">
  <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" class="img-fluid w-100 mb-4" {{ with .Title}} title="{{ . }}"{{ end }} />
</p>

Note: You can instead the content class="img-fluid w-100 mb-4 by yours, and using this method you can resize the image in markdown.

More Details : Configure Markup.

Youtube video

The youtube shortcode embeds a responsive video player for YouTube videos. Only the ID of the video is required, e.g.:

https://www.youtube.com/watch?v=w7Ft2ymGmfc

Example youtube Input

Copy the YouTube video ID that follows v= in the video’s URL and pass it to the youtube shortcode:

example-youtube-input.md :

{{
<youtube w7Ft2ymGmfc>
}}

Furthermore, you can automatically start playback of the embedded video by setting the autoplay parameter to true. Remember that you can’t mix named and unnamed parameters, so you’ll need to assign the yet unnamed video id to the parameter id:

example-youtube-input-with-autoplay.md :

{{
<youtube id="w7Ft2ymGmfc" autoplay="true">
}}

Important Note: PLease remove the inefeedin the youtue shortcode, so you can get the correct code.

Example youtube Output

Using the preceding youtube example, the following HTML will be added to your rendered website’s markup:

example-youtube-output.html

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
  <iframe src="https://www.youtube.com/embed/w7Ft2ymGmfc?autoplay=1" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe>
</div>

Example youtube Display

Using the preceding youtube example (without autoplay="true"), the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup. The video is also include in the Quick Start of the Hugo documentation.

More Detail: Shortcodes.