fix css not imported when prefix used
This commit is contained in:
27
Makefile
Normal file
27
Makefile
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Build the project ensuring Tailwind CSS is embedded.
|
||||||
|
# Usage:
|
||||||
|
# make build - builds gobsidian with embedded assets
|
||||||
|
# make build-linux - builds linux/amd64 binary (for server deploy)
|
||||||
|
# make clean
|
||||||
|
|
||||||
|
TAILWIND=./tailwindcss-linux-x64
|
||||||
|
TAILWIND_IN=./web/static/tailwind.input.css
|
||||||
|
TAILWIND_OUT=./web/static/tailwind.css
|
||||||
|
BINARY=gobsidian
|
||||||
|
|
||||||
|
.PHONY: build build-linux css clean
|
||||||
|
|
||||||
|
css:
|
||||||
|
@echo "Building Tailwind CSS -> $(TAILWIND_OUT)"
|
||||||
|
$(TAILWIND) -i $(TAILWIND_IN) -o $(TAILWIND_OUT) --minify
|
||||||
|
|
||||||
|
build: css
|
||||||
|
@echo "Building $(BINARY) with embedded assets"
|
||||||
|
go build -o $(BINARY) ./cmd
|
||||||
|
|
||||||
|
build-linux: css
|
||||||
|
@echo "Building $(BINARY) for linux/amd64 with embedded assets"
|
||||||
|
GOOS=linux GOARCH=amd64 go build -o $(BINARY) ./cmd
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(BINARY)
|
||||||
@@ -128,7 +128,7 @@ chmod +x tailwindcss-linux-x64
|
|||||||
```
|
```
|
||||||
```bash
|
```bash
|
||||||
go mod tidy
|
go mod tidy
|
||||||
go build -o gobsidian ./cmd
|
GOOS=linux GOARCH=amd64 go build -o gobsidian ./cmd
|
||||||
```
|
```
|
||||||
## Image storing trying to follow Obsidian settings
|
## Image storing trying to follow Obsidian settings
|
||||||
Image storing modes:
|
Image storing modes:
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{{.app_name}}</title>
|
<title>{{.app_name}}</title>
|
||||||
<link rel="stylesheet" href="{{.prefix}}/static/tailwind.css">
|
<link rel="stylesheet" href="{{url "/static/tailwind.css"}}">
|
||||||
<link rel="stylesheet" href="{{.prefix}}/static/styles.css">
|
<link rel="stylesheet" href="{{url "/static/styles.css"}}">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user