diff options
author | Jonas Smedegaard <dr@jones.dk> | 2024-07-24 16:43:16 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2024-07-24 16:43:16 +0200 |
commit | cfc1c02dd05e57ef82534062c580b10e26c5ab97 (patch) | |
tree | d5e795eff13f24a5fa6fdea3f7747dc2e1c5b883 | |
parent | 2890a6a283ae1f582d5f16229bf69f2dcce8550e (diff) | |
parent | 4bfe065cefde8dfc4de520e8750e1f3799deb4ca (diff) |
Merge remote-tracking branch 'ikiwiki/couchdesign/bullseye-da'
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 27 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | config/ikiwiki.setup.in | 12 | ||||
m--------- | shared | 0 |
5 files changed, 36 insertions, 6 deletions
@@ -2,5 +2,6 @@ /build/ /content/ /styling/ +/forms/ /config/ikiwiki*.setup /.ikiwiki*/ @@ -13,6 +13,8 @@ export CURDIR cssprojects ?= $(wildcard shared/themes/goab styling) +sass_includes ?= shared/themes/default /usr/share/sass /usr/share/sass/stylesheets /usr/share/compass/frameworks/normalize-scss/stylesheets + all: build -include shared/include.mk @@ -23,6 +25,8 @@ always-make = $(findstring B,$(MAKEFLAGS)) avoid-broken-git = $(shell cd content && git symbolic-ref -q HEAD > /dev/null || echo " --no-rcs") iki_configfiles := $(or $(patsubst %.in,%,$(wildcard config/ikiwiki*.setup.in)),config/ikiwiki.setup) +iki_projects = $(patsubst config/%.setup,build-iki/%,$(iki_configfiles)) +form_projects := $(patsubst forms/%.cgi,build-form/%,$(wildcard forms/*.cgi forms/*/*.cgi)) init: shared/.git content $(MAKE) $(iki_configfiles) @@ -38,7 +42,13 @@ config/ikiwiki.setup.in: configfiles: $(iki_configfiles) $(iki_configfiles): iki_flavor = $(if $(filter config/ikiwiki-%.setup,$@),$(@:config/ikiwiki-%.setup=%)) $(iki_configfiles): % : %.in - ikiwiki $(IKIWIKI_DEFAULTS) $(patsubst %,--setup %,$(wildcard $<)) --dumpsetup $@ + ikiwiki $(IKIWIKI_DEFAULTS) \ + $(if $(IKIWIKI_UNDERLAYS)$(IKIWIKI_SHARED_UNDERLAYS),\ + --set-yaml add_underlays="$$(echo $(strip \ + $(IKIWIKI_UNDERLAYS) \ + $(IKIWIKI_SHARED_UNDERLAYS)) \ + | perl -pe 's/\s+/\n/g;s/^/- /gm')") \ + $(patsubst %,--setup %,$(wildcard $<)) --dumpsetup $@ perl -i -pe '$$s=$$ENV{'CURDIR'}; s/\@CURDIR\@/$$s/g' $@ content: notempty = $(wildcard $@/*.mdwn) @@ -46,8 +56,15 @@ content: $(if $(notempty),,mkdir -p '$@') $(if $(notempty),,printf '# Hello world!\n\nHello world!\n' > '$@/index.mdwn') -build: - $(if $(cssprojects),$(MAKE) $(cssprojects)) - $(foreach config,$(shell find config -name '*.setup'),ikiwiki --setup $(config)$(avoid-broken-git)$(if $(always-make), --rebuild, --refresh);) +build: $(iki_projects) $(form_projects) +$(iki_projects): build-iki/%: config/%.setup $(cssprojects) + ikiwiki --setup $<$(avoid-broken-git)$(if $(always-make), --rebuild, --refresh) +$(form_projects): build-form/%: forms/%.cgi build-iki/ikiwiki + install -DT $< build/$< + perl -i -pe "s:'../build:'$(CURDIR)/build:g" build/$< + cp -f build/html/$*/index.html build/html/$*/index.tmpl + FORMBUILDER_NOHEADER=1 build/$< > build/html/$*/index.html~ + mv -f build/html/$*/index.html~ build/html/$*/index.html + rm build/html/$*/index.tmpl -.PHONY: all build configfiles +.PHONY: all build build-iki/% build-form/% configfiles @@ -3,7 +3,7 @@ Ikiwiki build environment To quickly start working with content, this should suffice: - git clone git://source.jones.dk/ikiwiki/site + git clone git://source.jones.dk/ikiwiki cd site make init make diff --git a/config/ikiwiki.setup.in b/config/ikiwiki.setup.in new file mode 100644 index 0000000..ed57570 --- /dev/null +++ b/config/ikiwiki.setup.in @@ -0,0 +1,12 @@ +# IkiWiki::Setup::Yaml - YAML formatted setup file +# +# Seed info for creating ikiwiki setup file. +# +# Passing this to ikiwiki --setup ... --dumpsetup will make ikiwiki +# generate its setup file. +# +# Remember to remove ikiwiki.setup and re-run make init any time you +# edit this file. +# +# name of the wiki +wikiname: Example website diff --git a/shared b/shared -Subproject 8418a770a2be476ecd961d3279d00e151a0a531 +Subproject 1fb36673e48bdfff47aac4a283b6227a4693258 |