You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53-28Lines changed: 53 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,17 @@
2
2
3
3

4
4
5
+
**Content:**
6
+
7
+
-[Install](#install)
8
+
-[Usage](#usage)
9
+
-[Use it](#use-it)
10
+
-[List your dev.to articles](#list-your-devto-articles)
11
+
-[Preview the Markdown content that will be pushed to dev.to](#preview-the-markdown-content-that-will-be-pushed-to-devto)
12
+
-[Push one blog post to dev.to](#push-one-blog-post-to-devto)
13
+
-[Push all blog posts to dev.to](#push-all-blog-posts-to-devto)
14
+
-[Notes](#notes)
15
+
5
16
## Install
6
17
7
18
```sh
@@ -34,9 +45,10 @@ First, copy your dev.to token from your dev.to settings and set it as an environ
34
45
export DEVTO_APIKEY=$(lpass show dev.to -p)
35
46
```
36
47
37
-
**List your dev.to posts**. This is useful because I have dev.to configured with
38
-
the RSS feed of my blog so that dev.to automatically creates a draft of each
39
-
of my new posts.
48
+
### List your dev.to articles
49
+
50
+
This is useful because I have dev.to configured with the RSS feed of my
51
+
blog so that dev.to automatically creates a draft of each of my new posts.
40
52
41
53
```sh
42
54
% hudevto list
@@ -49,7 +61,34 @@ of my new posts.
49
61
317339: published at https://dev.to/maelvls/learning-kubernetes-controllers-496j (Learning Kubernetes Controllers)
50
62
```
51
63
52
-
**Preview the Markdown content that will be pushed to dev.to**.
64
+
### Preview the Markdown content that will be pushed to dev.to
65
+
66
+
I use the `hudevto preview` command because I do some transformations and I need a way to preview the changes to make sure the Markdown and front matter make sense. The transformations are:
67
+
68
+
- Generate a new front matter which is used by dev.to for setting the dev.to post title and canonical URL;
69
+
- Change the Hugo "tags" into Liquid tags, such as:
70
+
71
+
```md
72
+
{{< youtube 30a0WrfaS2A >}}
73
+
```
74
+
75
+
is changed to the Liquid tag:
76
+
77
+
```md
78
+
{% youtube 30a0WrfaS2A %}
79
+
```
80
+
81
+
- Add the base URL of the post to the markdown images so that images are not broken. ONLY WORKS if your images are stored along side your blog post, such as:
82
+
83
+
```sh
84
+
% ls --tree ./content/2020/avoid-gke-lb-using-hostport
In my spare time, I maintain a tiny "playground" Kubernetes cluster on [GKE](https://cloud.google.com/kubernetes-engine) (helm charts [here](https://github.com/maelvls/k.maelvls.dev)). I quickly realized that realized using `Service type=LoadBalancer`in GKE was spawning a _[Network Load Balancer](https://cloud.google.com/load-balancing/docs/network)_ which costs approximately **\$15 per month**! In this post, I present a way of avoiding the expensive Google Network Load Balancer by load balancing in-cluster using akrobateo, which acts as a Service type=LoadBalancer controller.
74
113
```
75
114
76
-
I use the `preview` command because I do some transformations and I need a way to preview the changes to make sure the Markdown and front matter make sense. The transformations are:
77
-
78
-
- Generate a new front matter which is used by dev.to for setting the dev.to post title and canonical URL;
79
-
- Change the Hugo "tags" into Liquid tags, such as:
80
-
```md
81
-
{{< youtube 30a0WrfaS2A >}}
82
-
```
83
-
is changed to the Liquid tag:
84
-
```md
85
-
{% youtube 30a0WrfaS2A %}
86
-
```
87
-
- Gdd the base URL of the post to the markdown images so that images are not broken. ONLY WORKS if your images are stored along side your blog post, such as:
88
-
```sh
89
-
% ls --tree ./content/2020/avoid-gke-lb-using-hostport
success: ./content/2020/avoid-gke-lb-using-hostport/index.md pushed published to https://dev.to/maelvls/avoid-gke-s-expensive-load-balancer-by-using-hostport-2ab9 (devtoId: 241275, devtoPublished: true)
103
120
```
104
121
105
-
**Push all blog posts to dev.to**
122
+
### Push all blog posts to dev.to
106
123
107
124
```sh
125
+
% hudevto push
126
+
success: ./content/notes/dns.md pushed unpublished to https://dev.to/maelvls/it-s-always-the-dns-fault-3lg3-temp-slug-8953915/edit (devtoId: 410260, devtoPublished: false)
127
+
success: ./content/2020/deployment-available-condition/index.md pushed published to https://dev.to/maelvls/understanding-the-available-condition-of-a-kubernetes-deployment-51li (devtoId: 386691, devtoPublished: true)
128
+
success: ./content/2020/docker-proxy-registry-kind/index.md pushed published to https://dev.to/maelvls/pull-through-docker-registry-on-kind-clusters-cpo (devtoId: 410837, devtoPublished: true)
129
+
success: ./content/2020/mitmproxy-kubectl/index.md pushed published to https://dev.to/maelvls/using-mitmproxy-to-understand-what-kubectl-does-under-the-hood-36om (devtoId: 377876, devtoPublished: true)
130
+
success: ./content/2020/static-libraries-and-autoconf-hell/index.md pushed published to https://dev.to/maelvls/epic-journey-with-statically-and-dynamically-linked-libraries-a-so-1khn (devtoId: 365849, devtoPublished: true)
131
+
success: ./content/2020/gh-actions-with-tf-private-repo/index.md pushed published to https://dev.to/maelvls/github-actions-with-a-private-terraform-module-5b85 (devtoId: 331169, devtoPublished: true)
0 commit comments