mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2024-12-28 15:45:52 -05:00
3.2 KiB
3.2 KiB
author | title | date | description | summary | tags | categories | series | ShowToc | TocOpen | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Code Syntax Guide | 2019-03-10 | Sample article showcasing basic code syntax and formatting for HTML elements. | Sample article showcasing basic code syntax and formatting for HTML elements. |
|
|
|
true | true |
Inline Code
This is Inline Code
Only pre
This is pre text
Code block with backticks
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
<meta
name="description"
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
/>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block with backticks and language specified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
<meta
name="description"
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
/>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block with backticks and language specified with line numbers
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
<meta
name="description"
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
/>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block with line numbers and highlighted lines
- PaperMod supports
linenos=true
orlinenos=table
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
<meta
name="description"
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
/>
</head>
<body>
<p>Test</p>
</body>
</html>
Withlinenos=inline
line might not get highlighted properly.- This issue is fixed with 045c084
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
<meta
name="description"
content="Sample article showcasing basic Markdown syntax and formatting for HTML elements."
/>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block indented with four spaces
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block with Hugo's internal highlight shortcode
{{< highlight html >}}
<!doctype html>
<html lang="en"> <head> </head>Test
</html> {{< /highlight >}}Github Gist
{{< gist adityatelange 376cd56ee2c94aaa2e8b93200f2ba8b5 >}}