Skip to content
Snippets Groups Projects
Verified Commit d73081e4 authored by TheJoeCoder's avatar TheJoeCoder
Browse files

Add new content

parent d777a49e
No related branches found
No related tags found
No related merge requests found
Pipeline #250 passed
...@@ -13,15 +13,30 @@ ...@@ -13,15 +13,30 @@
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "posts/2024-11-27 First Blog Post.md", "file": "posts/First Blog Post.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "First Blog Post"
}
},
{
"id": "1f44ec327a2372e7",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "posts/Escaping Text for URLs in Python.md",
"mode": "source", "mode": "source",
"source": true "source": false
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "2024-11-27 First Blog Post" "title": "Escaping Text for URLs in Python"
} }
} }
] ],
"currentTab": 1
} }
], ],
"direction": "vertical" "direction": "vertical"
...@@ -166,8 +181,7 @@ ...@@ -166,8 +181,7 @@
} }
], ],
"direction": "horizontal", "direction": "horizontal",
"width": 300, "width": 300
"collapsed": true
}, },
"left-ribbon": { "left-ribbon": {
"hiddenItems": { "hiddenItems": {
...@@ -180,12 +194,12 @@ ...@@ -180,12 +194,12 @@
"bulk-exporter:Bulk Exporter Preview": false "bulk-exporter:Bulk Exporter Preview": false
} }
}, },
"active": "e5912a702b758f30", "active": "1f44ec327a2372e7",
"lastOpenFiles": [ "lastOpenFiles": [
"posts/First Blog Post.md",
"posts/Escaping Text for URLs in Python.md",
"templates/Blog Post Template.md", "templates/Blog Post Template.md",
"posts/2024-11-27 First Blog Post.md",
"images/Pasted image 20241127184913.png", "images/Pasted image 20241127184913.png",
"Untitled.md",
"images", "images",
"posts", "posts",
"First Blog Post.md", "First Blog Post.md",
......
---
title: Escaping Text for URLs in Python
date: 2024-11-28T08:58:24+00:00
draft: false
tags:
- programming
- python
---
Escaping text for is really easy in Python. In fact, I used it for this project.
Here's how to do it:
```python
from urllib.parse import quote
starting_text = "Test!"
escaped_text = quote(starting_text)
```
Initially, I thought that `urllib.parse.urlencode` should be used for this but I didn't read the documentation properly.
I realised that `urllib.parse.urlencode` is used for creating query strings from a dict, whereas `urllib.parse.quote` is actually used for escaping text.
\ No newline at end of file
--- ---
title: 2024-11-27 First Blog Post title: First Blog Post
date: 2024-11-27T21:01:51+00:00 date: 2024-11-27T21:01:51+00:00
draft: false draft: false
tags: tags:
- test
--- ---
This is mostly a test of the scripts I'm writing to try and get Obsidian to sync to Hugo... hopefully. This is mostly a test of the scripts I'm writing to try and get Obsidian to sync to Hugo... hopefully.
......
---
title: Escaping Text for URLs in Python
date: 2024-11-28T08:58:24+00:00
draft: false
tags:
- programming
- python
---
Escaping text for is really easy in Python. In fact, I used it for this project.
Here's how to do it:
```python
from urllib.parse import quote
starting_text = "Test!"
escaped_text = quote(starting_text)
```
Initially, I thought that `urllib.parse.urlencode` should be used for this but I didn't read the documentation properly.
I realised that `urllib.parse.urlencode` is used for creating query strings from a dict, whereas `urllib.parse.quote` is actually used for escaping text.
\ No newline at end of file
--- ---
title: 2024-11-27 First Blog Post title: First Blog Post
date: 2024-11-27T21:01:51+00:00 date: 2024-11-27T21:01:51+00:00
draft: false draft: false
tags: tags:
- test
--- ---
This is mostly a test of the scripts I'm writing to try and get Obsidian to sync to Hugo... hopefully. This is mostly a test of the scripts I'm writing to try and get Obsidian to sync to Hugo... hopefully.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment