Skip to content

Commit

Permalink
exampleSite: Add Code Syntax Guide
Browse files Browse the repository at this point in the history
  • Loading branch information
adityatelange committed May 21, 2023
1 parent 856fdaa commit b3c5b33
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions exampleSite/content/code-syntax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: "Code Syntax Guide"
date: "2019-03-11"
description: "Sample article showcasing basic code syntax and formatting for HTML elements."
tags: ["markdown", "css", "html"]
---

### Inline Code

`This is Inline Code`

### Only `pre`

<pre>
This is pre text
</pre>

### 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

```html {linenos=true,hl_lines=8}
<!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>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
{{< /highlight >}}

### Gist

{{< gist spf13 7896402 >}}

0 comments on commit b3c5b33

Please sign in to comment.