2017-11-27 03:14:32 +05:30
|
|
|
THEME := themes/gitea
|
|
|
|
PUBLIC := public
|
|
|
|
ARCHIVE := https://dl.gitea.io/theme/master.tar.gz
|
|
|
|
|
2022-12-22 07:39:53 +05:30
|
|
|
HUGO_PACKAGE := github.com/gohugoio/hugo@v0.81.0
|
|
|
|
|
2017-11-27 03:14:32 +05:30
|
|
|
.PHONY: all
|
|
|
|
all: build
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf $(PUBLIC) $(THEME)
|
|
|
|
|
|
|
|
.PHONY: trans-copy
|
|
|
|
trans-copy:
|
2022-12-22 07:39:53 +05:30
|
|
|
bash scripts/trans-copy.sh
|
2017-11-27 03:14:32 +05:30
|
|
|
|
|
|
|
.PHONY: server
|
|
|
|
server: $(THEME)
|
2022-12-22 07:39:53 +05:30
|
|
|
go run $(HUGO_PACKAGE) server
|
2017-11-27 03:14:32 +05:30
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: $(THEME)
|
2022-12-22 07:39:53 +05:30
|
|
|
go run $(HUGO_PACKAGE) --cleanDestinationDir
|
2017-11-27 03:14:32 +05:30
|
|
|
|
2020-07-14 07:39:39 +05:30
|
|
|
.PHONY: build-offline
|
|
|
|
build-offline: $(THEME)
|
2022-12-22 07:39:53 +05:30
|
|
|
go run $(HUGO_PACKAGE) --baseURL="/" --cleanDestinationDir
|
2020-07-14 07:39:39 +05:30
|
|
|
|
2017-11-27 03:14:32 +05:30
|
|
|
.PHONY: update
|
|
|
|
update: $(THEME)
|
|
|
|
|
2018-01-07 17:41:17 +05:30
|
|
|
$(THEME): $(THEME)/theme.toml
|
|
|
|
$(THEME)/theme.toml:
|
|
|
|
mkdir -p $$(dirname $@)
|
2021-05-27 03:33:39 +05:30
|
|
|
curl -L -s $(ARCHIVE) | tar xz -C $$(dirname $@)
|