Skip to content

Commit

Permalink
Add blogpost template with markdown syntax examples
Browse files Browse the repository at this point in the history
  • Loading branch information
matysek committed Sep 7, 2021
1 parent 1d87797 commit 625b0fb
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ index 2d6a91d..ce48112 160000
+Subproject commit ce48112de29f91330ec4da2bfb7ed14d0ee1a19f
```

To create a blog post copy a template to `content/posts` like this

```bash
cp blogpost-template.md content/posts/MY_NEW_BLOGPOST.md
```
102 changes: 102 additions & 0 deletions blogpost-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Hugo static generator items
# TODO Chagne title, date and draft: False to be visible
# TODO Chage content to your desired state
---
title: "My Post Title"
date: 2021-09-07T10:37:43+02:00
draft: true
---


# Blog template
## A template for markdown blogs with GitHub pages
![Markdown logo](/assets/img/md_logo.png)
# Instructions for deploying this blog template
If you plan on using this on your website, just click "Use this template" or fork this repo.
I highly recommend [dillinger markdown editor](https://dillinger.io/) for editing markdown files. [repl.it](https://repl.it)
is also good.
This repo has gh-pages as it's default branch. This will automatically put your README.MD file (this file) on yourusername.github.io/blog.

# Markdown syntax and examples
## Contents
### * [Headings](https://github.com/KazMalhotra/blog#heading-1)
### * [Text styling](https://kazmal.tech/blog#text-styling)
### * [Block Quotes](https://kazmal.tech/blog#block-quotes)
### * [Superscript and Subscript](https://kazmal.tech/blog#superscript-and-subscript)
### * [Code blocks](https://kazmal.tech/blog#code-blocks)
### * [Tables](https://kazmal.tech/blog#tables)
### * [Lists](https://kazmal.tech/blog#lists)
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6


### Text styling
\*ignore markdown characters\*
*Italic*
**Bold**
**_Bold and italic_**
### Block quotes
> Intelligence is the ability to avoid doing work, yet getting the work done.
> -Linus Torvalds
### Superscript and subscript

##### Superscript demonstrated by Einstein famous Mass–energy equivalence
E=MC<sup>2</sup>
##### Subscript demonstrated by the equation for finding the Nth Fibonacci number recursively
F<sub>n</sub>=F<sub>n-1</sub>+F<sub>n-2</sub>

### Code blocks
`Wow, code block`
```
Multi-line code block
In markdown, makes a haiku
Japanese poem
```
With JS syntax highlighting
``` js
function fib(n){
if(n < 2) return n;
return fib(n - 1) + fib(n - 2);
}
```

### Tables
##### Note: Tables sometimes render incorrectly when bieng viewed in a browser. If you are having this issue, view this file [here](https://github.com/KazMalhotra/blog/blob/gh-pages/README.md#tables)
| Column | Different column |
| ------ | ----------- |
| Table thing one |*their called arguments* |
| Row | **No, their called parameters** |
| Cell| `Actually, their called cells.` |

### Lists
* Top list
*-Other thing*
* Top list 2
1. *Foo*
2. *Bar*
3. *Ack*


1. List item
2. *List item*
3. **_List item_**

- List item 1
- List item 2
- List item 3
[The repo for this template](https://github.com/kazmalhotra/blog)
[Go to my website](https://kazmal.tech)
[Go to the live version of this file](https://kazmal.tech/blog)
~~strikethrough~~


(c) Kaz Malhotra 2019




0 comments on commit 625b0fb

Please sign in to comment.