aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-02-20 17:16:08 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-02-20 17:16:08 +0100
commit80fad83ef26a4431247cad3f432cc085c335e942 (patch)
treeb4eee8b40be5ec3f66fe464af9d4f631be496f13
parentBasic configuration for the Hugo theme (diff)
downloadblog-80fad83ef26a4431247cad3f432cc085c335e942.tar.gz
blog-80fad83ef26a4431247cad3f432cc085c335e942.tar.zst
blog-80fad83ef26a4431247cad3f432cc085c335e942.zip
Migrate to dart-sass
Currently, Hugo requires dart-sass-embedded on the PATH, because the executable is not embedded inside Hugo. The added Makefile automatically download dart-sass-embedded and sets PATH. Using dart-sass-embedded 1.0.0-beta.5 with Hugo v0.80.0/extended from Arch linux, because 1.0.0-beta.6 requires Hugo v0.81.0, which is not yet in the repositories.
-rw-r--r--.gitignore4
-rw-r--r--Makefile55
-rw-r--r--content/_index.md8
m---------themes/marussy0
4 files changed, 64 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 1aaf957..600e5a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
1# Hugo default output directory 1# Hugo default output directory
2/public 2/public
3
4/resources/_gen 3/resources/_gen
4
5# dart-sass-embedded
6/vendor/sass_embedded
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3274451
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,55 @@
1SERVER_BASE_URL ?= https://dev.marussy.com
2SERVER_PORT ?= 1313
3SERVER_LIVE_RELOAD_PORT ?= 443
4DART_SASS_EMBEDDED_VERSION ?= 1.0.0-beta.5
5
6ifeq ($(origin DART_SASS_DOWNLOAD_URL), undefined)
7close_paren := )
8ifeq ($(origin DART_SASS_EMBEDDED_PLATFORM), undefined)
9DART_SASS_EMBEDDED_PLATFORM := $(shell case "$$(uname -s)" in \
10 Linux*$(close_paren) echo 'linux' ;; \
11 Darwin*$(close_paren) echo 'macos' ;; \
12 CYGWIN*|MINGW*$(close_paren) echo 'windows' ;; \
13 *$(close_paren) echo 'unknown' ;; \
14esac)
15endif
16ifeq ($(origin DART_SASS_EMBEDDED_ARCH), undefined)
17DART_SASS_EMBEDDED_ARCH := $(shell case "$$(uname -m)" in \
18 i?86$(close_paren) echo 'ia32' ;; \
19 x86_64|amd64|arm64$(close_paren) echo 'x64' ;; \
20 *$(close_paren) echo 'unknown' ;; \
21esac)
22endif
23DART_SASS_DOWNLOAD_URL := https://github.com/sass/dart-sass-embedded/releases/download/$(DART_SASS_EMBEDDED_VERSION)/sass_embedded-$(DART_SASS_EMBEDDED_VERSION)-$(DART_SASS_EMBEDDED_PLATFORM)-$(DART_SASS_EMBEDDED_ARCH).tar.gz
24endif
25
26VENDOR_DIR ?= vendor
27
28DART_SASS_EMBEDDED_DIR := $(VENDOR_DIR)/sass_embedded
29DART_SASS_EMBEDDED_BINARY := $(DART_SASS_EMBEDDED_DIR)/dart-sass-embedded
30
31HUGO ?= hugo
32HUGO := PATH="$(DART_SASS_EMBEDDED_DIR):$${PATH}" $(HUGO)
33
34.PHONY: all server upgrade_dart_sass_embedded
35
36all: $(DART_SASS_EMBEDDED_BINARY)
37
38server:
39 @$(HUGO) server --baseUrl=$(SERVER_BASE_URL) \
40 --buildDrafts \
41 --disableFastRender \
42 --liveReloadPort=$(SERVER_LIVE_RELOAD_PORT) \
43 --minify \
44 --port=$(SERVER_PORT)
45
46upgrade_dart_sass_embedded:
47 @rm -rf $(DART_SASS_EMBEDDED_DIR)
48 @$(MAKE) --no-print-directory $(DART_SASS_EMBEDDED_BINARY)
49
50$(DART_SASS_EMBEDDED_BINARY):
51 @echo "Downloading $(DART_SASS_DOWNLOAD_URL)..."
52 @mkdir -p vendor
53 @cd vendor && \
54 rm -rf sass_embedded && \
55 curl -L $(DART_SASS_DOWNLOAD_URL) | tar xz
diff --git a/content/_index.md b/content/_index.md
index 7204757..ea155c0 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -2,6 +2,10 @@
2 2
3Hello World! [This is a link](/). 3Hello World! [This is a link](/).
4 4
5One morning, when **Gregor Samsa** woke from _troubled dreams,_ he found himself transformed in his bed into a [horrible vermin](/). He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. "What's happened to me?" he thought. 5One morning, as **Gregor Samsa** was waking up from _anxious dreams,_ he discovered that in bed he had been changed into a [monstrous verminous bug](/). He lay on his armour-hard back and saw, as he lifted his head up a little, his brown, arched abdomen divided up into rigid bow-like sections. From this height the blanket, just about ready to slide off completely, could hardly stay in place. His numerous legs, pitifully thin in comparison to the rest of his circumference, flickered helplessly before his eyes.
6 6
7It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls. A collection of textile samples lay spread out on the table -- Samsa was a travelling salesman -- and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. 7"What's happened to me," he thought. It was no dream. His room, a proper room for a human being, only somewhat too small, lay quietly between the four well-known walls. Above the table, on which an unpacked collection of sample cloth goods was spread out (Samsa was a traveling salesman) hung the picture which he had cut out of an illustrated magazine a little while ago and set in a pretty gilt frame. It was a picture of a woman with a fur hat and a fur boa. She sat erect there, lifting up in the direction of the viewer a solid fur muff into which her entire forearm disappeared.
8
9<!-- Gregor's glance then turned to the window. The dreary weather (the rain drops were falling audibly down on the metal window ledge) made him quite melancholy. "Why don't I keep sleeping for a little while longer and forget all this foolishness," he thought. But this was entirely impractical, for he was used to sleeping on his right side, and in his present state he couldn't get himself into this position. No matter how hard he threw himself onto his right side, he always rolled again onto his back. He must have tried it a hundred times, closing his eyes, so that he would not have to see the wriggling legs, and gave up only when he began to feel a light, dull pain in his side which he had never felt before.
10
11"O God," he thought, "what a demanding job I've chosen! Day in, day out on the road. The stresses of trade are much greater than the work going on at head office, and, in addition to that, I have to deal with the problems of traveling, the worries about train connections, irregular bad food, temporary and constantly changing human relationships which never come from the heart. To hell with it all!" He felt a slight itching on the top of his abdomen. He slowly pushed himself on his back closer to the bed post so that he could lift his head more easily, found the itchy part, which was entirely covered with small white spots (he did not know what to make of them), and wanted to feel the place with a leg. But he retracted it immediately, for the contact felt like a cold shower all over him. -->
diff --git a/themes/marussy b/themes/marussy
Subproject ba6800ad896550d56dca0b1250c51936c5fb7d8 Subproject a718ae01cf23619967964852f6806ce4e76cf89