forked from acl-org/acl-anthology
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Established aclanthology.org as canonical site (acl-org#1328)
* changed canonical to aclanthology.org * straightened out mirror and main uploads * removed mirror target since it will just be redirects * updated host target in some support scripts * Adapt .htaccess to new canonical host - rewrite from www.aclanthology.org → aclanthology.org - http → https - make anthology-files a symlink so we don't have to modify its location in the .htaccess file * moved thumbnail script Co-authored-by: Arne Köhn <[email protected]>
- Loading branch information
Showing
9 changed files
with
37 additions
and
92 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,14 +29,14 @@ SHELL := /bin/bash | |
# If you want to host the anthology on your own, set ANTHOLOGY_PREFIX | ||
# in your call to make to your prefix, e.g. | ||
# | ||
# ANTHOLOGY_PREFIX="https://aclanthology.org" make | ||
# ANTHOLOGY_PREFIX="https://www.aclweb.org/anthology" make | ||
# | ||
# PLEASE NOTE that the prefix cannot contain any '#' character, or a Perl regex | ||
# below will fail. | ||
# The following line ensures that it is exported as an environment variable | ||
# for all sub-processes: | ||
|
||
export ANTHOLOGY_PREFIX ?= https://www.aclweb.org/anthology | ||
export ANTHOLOGY_PREFIX ?= https://aclanthology.org | ||
|
||
SLASHATEND:=$(shell echo ${ANTHOLOGY_PREFIX} | grep -q '/$$'; echo $$?) | ||
|
||
|
@@ -58,7 +58,7 @@ endif | |
# Root location for PDF and attachment hierarchy. | ||
# This is the directory where you have to put all the papers and attachments. | ||
# Easiest if the server can just serve them from /anthology-files. | ||
ANTHOLOGYFILES ?= /anthology-files | ||
ANTHOLOGYFILES ?= /var/www/anthology-files | ||
|
||
HUGO_ENV ?= production | ||
|
||
|
@@ -245,8 +245,8 @@ build/.hugo: build/.static build/.pages build/.bibtex build/.mods build/.endnote | |
--cleanDestinationDir \ | ||
--minify | ||
@cd build/website/$(ANTHOLOGYDIR) \ | ||
&& perl -i -pe 's|ANTHOLOGYDIR|$(ANTHOLOGYDIR)|g' .htaccess \ | ||
&& perl -i -pe 's|ANTHOLOGYFILES|$(ANTHOLOGYFILES)|g' .htaccess | ||
&& ln -s $(ANTHOLOGYFILES) anthology-files \ | ||
&& perl -i -pe 's|ANTHOLOGYDIR|$(ANTHOLOGYDIR)|g' .htaccess | ||
@touch build/.hugo | ||
|
||
.PHONY: mirror | ||
|
@@ -306,20 +306,14 @@ serve: | |
@echo "INFO Starting a server at http://localhost:8000/" | ||
@cd build/website && python3 -m http.server 8000 | ||
|
||
# this target does not use ANTHOLOGYDIR because the official website | ||
# only works if ANTHOLOGYDIR == anthology. | ||
# Main site: aclanthology.org. Requires ANTHOLOGYDIR to be unset. | ||
.PHONY: upload | ||
upload: | ||
@if [ $(ANTHOLOGYDIR) != "anthology" ]; then \ | ||
echo "WARNING: Can't upload because ANTHOLOGYDIR was set to '${ANTHOLOGYDIR}' instead of 'anthology'"; \ | ||
@if [[ $(ANTHOLOGYDIR) != "" ]]; then \ | ||
echo "WARNING: Can't upload because ANTHOLOGYDIR was set to '${ANTHOLOGYDIR}' instead of being empty"; \ | ||
exit 1; \ | ||
fi | ||
@echo "INFO Running rsync for main site..." | ||
@rsync -aze "ssh -o StrictHostKeyChecking=accept-new" --delete build/website/anthology/ [email protected]:anthology-static | ||
|
||
.PHONY: upload-mirror | ||
upload-mirror: | ||
@echo "INFO Running rsync for aclanthology.org mirror..." | ||
@echo "INFO Running rsync for main site (aclanthology.org)..." | ||
@rsync -aze "ssh -o StrictHostKeyChecking=accept-new" build/website/ [email protected]:/var/www/aclanthology.org | ||
|
||
# Push a preview to the mirror | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters