Skip to content

Commit

Permalink
Usa CSL remota em vez de checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
p3palazzo committed Jul 11, 2021
1 parent 422596b commit b2b102c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 37 deletions.
41 changes: 6 additions & 35 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# ================
VPATH = _lib
vpath %.bib _bibliography
vpath %.csl .:_csl
vpath %.yaml .:_spec
vpath default.% .:_lib
vpath reference.% .:_lib
Expand All @@ -28,53 +27,25 @@ PANDOC/LATEX := docker run --rm -v "`pwd`:/data" \

# Targets and recipes {{{1
# ===================
%.pdf : %.md references.bib _latex.yaml \
| _csl/apa.csl
$(PANDOC/LATEX) -d _latex.yaml -o $@ $<
%.pdf : %.md references.bib _latex.yaml
$(PANDOC/LATEX) -d _latex.yaml \
-M _metadata.yaml -o $@ $<
@echo "$< > $@"

%.docx : %.md $(DEFAULTS) \
| _csl/apa.csl
%.docx : %.md $(DEFAULTS)
$(PANDOC/CROSSREF) -d _spec/defaults.yaml \
-M _metadata.yaml -o $@ $<
@echo "$< > $@"

.PHONY : _site
_site : | _csl/chicago-fullnote-bibliography-with-ibid.csl
_site :
@$(JEKYLL/PANDOC) /bin/bash -c \
"chmod 777 /srv/jekyll && jekyll build"

_csl/%.csl : _csl
@cd _csl && git checkout master -- $(@F)
@echo "Checked out $(@F)."

# Install and cleanup {{{1
# ===================
.PHONY : serve
serve : | _csl/chicago-fullnote-bibliography-with-ibid.csl
serve :
@$(JEKYLL/PANDOC) jekyll serve

.PHONY : _csl
_csl :
@echo "Fetching CSL styles..."
@test -e $@ || \
git clone --depth=1 --filter=blob:none --no-checkout \
https://github.com/citation-style-language/styles.git \
$@

.PHONY : clean
clean :
-rm -rf _book/* _site _csl

.PHONY : submodule-update
submodule-update : | _sass _spec assets/css-slides reveal.js _site/reveal.js
@echo 'Updating _sass...'
@cd _sass && git checkout master && git pull --ff-only
@echo 'Updating _spec...'
@cd _spec && git checkout master && git pull --ff-only
@echo 'Updating assets/css-slides...'
@cd assets/css-slides && git checkout master && git pull --ff-only
@echo 'Updating reveal.js...'
@cd reveal.js && git checkout master && git pull --ff-only

# vim: set foldmethod=marker shiftwidth=2 tabstop=2 :
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ kramdown:
pandoc:
extensions:
- defaults: "_spec/html.yaml"
- csl: "_csl/chicago-fullnote-bibliography-with-ibid.csl"
- csl: "https://raw.githubusercontent.com/citation-style-language/styles/master/chicago-note-bibliography.csl"
- section-divs
relative_links:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion _metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
csl: "_csl/apa.csl"
csl: "https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl"
date: "15 de julio de 2021"
lang: es-ES
crossrefYaml: "_crossref.yaml"
Expand Down

0 comments on commit b2b102c

Please sign in to comment.