Skip to content

Commit 9909f65

Browse files
committed
fix: switch to jsdelivr as unpkg was throwing CORS errors
1 parent 34bf362 commit 9909f65

File tree

4 files changed

+24
-27
lines changed

4 files changed

+24
-27
lines changed

.goreleaser.yml

+18-21
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,31 @@ release:
44
owner: alecthomas
55
name: chroma
66
brews:
7-
-
8-
install: bin.install "chroma"
7+
- install: bin.install "chroma"
98
env:
109
- CGO_ENABLED=0
1110
builds:
12-
- goos:
13-
- linux
14-
- darwin
15-
- windows
16-
goarch:
17-
- arm64
18-
- amd64
19-
- "386"
20-
goarm:
21-
- "6"
22-
dir: ./cmd/chroma
23-
main: .
24-
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
25-
binary: chroma
11+
- goos:
12+
- linux
13+
- darwin
14+
- windows
15+
goarch:
16+
- arm64
17+
- amd64
18+
- "386"
19+
goarm:
20+
- "6"
21+
dir: ./cmd/chroma
22+
main: .
23+
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
24+
binary: chroma
2625
archives:
27-
-
28-
format: tar.gz
29-
name_template: '{{ .Binary }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{
30-
.Arm }}{{ end }}'
26+
- format: tar.gz
27+
name_template: "{{ .Binary }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
3128
files:
3229
- COPYING
3330
- README*
3431
snapshot:
3532
name_template: SNAPSHOT-{{ .Commit }}
3633
checksum:
37-
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
34+
name_template: "{{ .ProjectName }}-{{ .Version }}-checksums.txt"

bin/chroma

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set -euo pipefail
44

5-
(cd cmd/chroma ; go build -o $TMPDIR/chroma .) && exec $TMPDIR/chroma "$@"
5+
go build -C cmd/chroma -o $TMPDIR/chroma . && exec $TMPDIR/chroma "$@"

bin/chromad

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set -euo pipefail
44

5-
(cd cmd/chromad ; go build -o $TMPDIR/chromad .) && exec $TMPDIR/chromad "$@"
5+
go build -C cmd/chromad -o $TMPDIR/chromad . && exec $TMPDIR/chromad "$@"

cmd/chromad/templates/index.html.tmpl

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
{{ .CSRFField }}
2626

2727
<nav class="level">
28-
28+
2929
<div class="level-left">
3030
<div class="level-item">
3131
<div class="label">Code</div>
@@ -91,7 +91,7 @@
9191
<script type="module">
9292
{{JS "index.js"}}
9393
</script>
94-
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
95-
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
94+
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ionicons/ionicons.esm.js"></script>
95+
<script nomodule src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ionicons/ionicons.js"></script>
9696
</body>
97-
</html>
97+
</html>

0 commit comments

Comments
 (0)