aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2023-09-22 22:50:35 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2023-09-22 22:50:35 +0200
commit7c8a9ce4fc71719f0913affc260ed5ced4578098 (patch)
tree56527260c44325ae00027750eeadbcd59060a137
parentd98b76c18cb7cac0941211290b41748d3cc25f97 (diff)
feat: Deploy working version
-rw-r--r--Makefile5
-rw-r--r--README.md3
-rw-r--r--apache.conf37
-rw-r--r--config/_default/hugo.toml4
-rw-r--r--content/posts/markdown-cheat-sheet/cat.jpgbin1807832 -> 0 bytes
-rw-r--r--content/posts/markdown-cheat-sheet/index.md84
-rw-r--r--deploy.sh6
7 files changed, 53 insertions, 86 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5c44de5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,5 @@
+deploy:
+ hugo
+ rsync -avz --delete public/ ubuntu@nextcloud.kagamino.dev:~/kagamino_blog/
+ rsync -avz deploy.sh ubuntu@nextcloud.kagamino.dev:~/deploy.sh
+ rsync -avz apache.conf ubuntu@nextcloud.kagamino.dev:~/kagamino_blog.conf \ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e22bc2c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+## TODO
+
+- favicon
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 0000000..f4dd049
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,37 @@
+<IfModule mod_ssl.c>
+<VirtualHost *:443>
+ DocumentRoot /var/www/kagamino_blog
+ ServerName blog.kagamino.dev
+
+ <IfModule mod_headers.c>
+ Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
+ </IfModule>
+ <Directory /var/www/kagamino_blog>
+ Require all granted
+ AllowOverride All
+ Options FollowSymLinks MultiViews
+ </Directory>
+
+Include /etc/letsencrypt/options-ssl-apache.conf
+SSLCertificateFile /etc/letsencrypt/live/blog.kagamino.dev/fullchain.pem
+SSLCertificateKeyFile /etc/letsencrypt/live/blog.kagamino.dev/privkey.pem
+</VirtualHost>
+</IfModule>
+<IfModule mod_ssl.c>
+<VirtualHost *:80>
+ DocumentRoot /var/www/kagamino_blog
+ ServerName blog.kagamino.dev
+
+ <IfModule mod_headers.c>
+ Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
+ </IfModule>
+ <Directory /var/www/kagamino_blog>
+ Require all granted
+ AllowOverride All
+ Options FollowSymLinks MultiViews
+ </Directory>
+RewriteEngine on
+RewriteCond %{SERVER_NAME} =blog.kagamino.dev
+RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
+</VirtualHost>
+</IfModule> \ No newline at end of file
diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml
index c2d4768..b75aad0 100644
--- a/config/_default/hugo.toml
+++ b/config/_default/hugo.toml
@@ -1,5 +1,5 @@
-baseURL = 'http://blog.kagamino.dev/'
-copyright = "{year}" # To make 2007 - 2022. Just add before {year} example: 2007 - {year}
+baseURL = 'https://blog.kagamino.dev/'
+copyright = "{year}" # To make 2007 - 2022. Just add before {year} example: 2007 - {year}
languageCode = 'en-us'
theme = 'lowkey'
title = "Kagamino's Blog"
diff --git a/content/posts/markdown-cheat-sheet/cat.jpg b/content/posts/markdown-cheat-sheet/cat.jpg
deleted file mode 100644
index f08b907..0000000
--- a/content/posts/markdown-cheat-sheet/cat.jpg
+++ /dev/null
Binary files differ
diff --git a/content/posts/markdown-cheat-sheet/index.md b/content/posts/markdown-cheat-sheet/index.md
deleted file mode 100644
index 2ec722b..0000000
--- a/content/posts/markdown-cheat-sheet/index.md
+++ /dev/null
@@ -1,84 +0,0 @@
----
-title: "Markdown Cheat Sheet"
-draft: false
-date: 2022-08-27T09:16:45.000Z
-description: "A Python dictionary is like a JavaScript object – it’s a sequence of key:value pairs. So, you can create them like this:"
-categories:
-- Hello
-tags:
-- Hello
-- WhatsApp
----
-
-This Markdown cheat sheet **provides** a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for basic *syntax* and extended syntax.
-
-{{< img src="cat.jpg" alt="how are u" size-method="Fit" size-format="600x400 webp" position="center" >}}
-
-
-
-# Heading 1 {#custom-id}
-
-But what if you want to add another entry to the dictionary without going back to the dictionary to put it there? That's what we are going to look at in this article. And I'm going to show you how to do it in 3 different ways. Here's a sentence with a footnote. [^1]
-
-[^1]: This is the footnote.
-
-> For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally. Here's a sentence with a footnote. [^2]
-
-[^2]: Here We Go
-
-## And I'm going to show you how to do it in 3 different ways.
-These are the elements outlined in John Gruber’s original design document. All Markdown applications support these elements.
-
-1. Get One
-2. Get Two
-3. Get three
-
-
-### Heading 3
-These elements extend the basic `syntax` by adding additional features. Not all Markdown applications support these elements.
-
----
-
-Control the position of [title](https://www.example.com) the markers and text indentation in a list using the list-inside and list-outside utilities.
-
-- List One
-- List Two
-- List Three
-
-#### Heading 4
-Unlike other blockquote techniques, this style does not require a nested block-level element (like p). As such, it turns a paragraph into an inline-styled element to keep the content from dropping below the quote.
-
-| Syntax | Description |
-| ----------- | ----------- |
-| Header | Title |
-| Paragraph | Text |
-
-##### Heading 5
-
-In the separated borders model, the border makes the entire box look as though it were embedded in the canvas. In the collapsing border model, drawn the same as 'ridge'.
-
-```
-{
- "firstName": "John",
- "lastName": "Smith",
- "age": 25
-}
-```
-
-Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:scroll-auto to only ~~The world is flat.~~
- apply the scroll-auto utility on hover.
-
-term
-: definition
-
-###### Heading 6
-
-
-That is so funny! :joy:
-Ini adalah contoh lain dari subscript: x_{2}_.
-
-
-{{< begin-task-list >}}
-- [x] Write the press release
-- [ ] Update the website
-- [ ] Contact the media \ No newline at end of file
diff --git a/deploy.sh b/deploy.sh
new file mode 100644
index 0000000..fa24151
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+sudo mv kagamino_blog.conf /etc/apache2/sites-available/
+sudo ln -fs /etc/apache2/sites-available/kagamino_blog.conf /etc/apache2/sites-enabled/
+sudo rsync -avz --delete kagamino_blog/ /var/www/kagamino_blog/
+sudo chown -R www-data:www-data /var/www/kagamino_blog
+sudo service apache2 restart \ No newline at end of file