Skip to content

Commit 01f91ca

Browse files
authored
Merge pull request #82 from SADevs/gtmanfred/maint/add-google-links
add google maps links to events with Locations
2 parents 4bb7480 + f2181e9 commit 01f91ca

File tree

9 files changed

+177
-314
lines changed

9 files changed

+177
-314
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ cache: pip
44
python:
55
- 3.6
66
install:
7-
- pip install pipenv
8-
- pipenv install
7+
- python3 -m pip install -r requirements.txt
98
script:
109
- git submodule update --init
11-
- pipenv run pelican content -vvv -o output -s pelicanconf.py
10+
- python3 -m pelican content -vvv -o output -s pelicanconf.py
1211

1312
deploy:
1413
provider: pages

Makefile

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ PY?=python3
22
PELICAN?=pelican
33
PELICANOPTS=
44
PYTHON=python3
5-
PIPENV_PATH?=$(shell command -v pipenv 2> /dev/null)
6-
PIPENV?=$(PYTHON) -m pipenv
7-
PIPENV_RUN?=$(PIPENV) run
85
PIP?=$(PYTHON) -m pip
96

107
APP_NAME?=$(HEROKU_APP_NAME)
@@ -42,50 +39,45 @@ help:
4239
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
4340
@echo ' '
4441

45-
pipenv:
46-
ifeq ($(PIPENV_PATH),)
47-
$(PIP) install pipenv
48-
endif
49-
50-
install: pipenv
51-
$(PIPENV) install
42+
install:
43+
$(PIP) install -r requirements.txt
5244

5345
html: install
54-
env APP_NAME=$(APP_NAME) $(PIPENV_RUN) $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
46+
env APP_NAME=$(APP_NAME) $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
5547

5648
clean:
5749
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
5850

5951
regenerate: installthemes/brutalist/README.md
60-
$(PIPENV_RUN) $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
52+
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
6153

6254
serve:
6355
ifdef PORT
64-
$(PIPENV_RUN) $(PELICAN) --listen -p $(PORT) $(OUTPUTDIR)
56+
$(PELICAN) --listen -p $(PORT) $(OUTPUTDIR)
6557
else
66-
$(PIPENV_RUN) $(PELICAN) --listen $(OUTPUTDIR)
58+
$(PELICAN) --listen $(OUTPUTDIR)
6759
endif
6860

6961
serve-global:
7062
ifdef SERVER
71-
$(PIPENV_RUN) $(PELICAN) 80 $(SERVER) $(OUTPUTDIR)
63+
$(PELICAN) 80 $(SERVER) $(OUTPUTDIR)
7264
else
73-
$(PIPENV_RUN) $(PELICAN) 80 0.0.0.0 $(OUTPUTDIR)
65+
$(PELICAN) 80 0.0.0.0 $(OUTPUTDIR)
7466
endif
7567

7668

7769
devserver:
7870
ifdef PORT
79-
$(PIPENV_RUN) $(BASEDIR)/develop_server.sh restart $(PORT)
71+
$(BASEDIR)/develop_server.sh restart $(PORT)
8072
else
81-
$(PIPENV_RUN) $(BASEDIR)/develop_server.sh restart
73+
$(BASEDIR)/develop_server.sh restart
8274
endif
8375

8476
stopserver:
85-
$(PIPENV_RUN) $(BASEDIR)/develop_server.sh stop
77+
$(BASEDIR)/develop_server.sh stop
8678
@echo 'Stopped Pelican and SimpleHTTPServer processes running in background.'
8779

8880
publish: install themes/brutalist/README.md
89-
$(PIPENV_RUN) $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
81+
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
9082

9183
.PHONY: install html help clean regenerate serve serve-global devserver stopserver publish

Pipfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

Pipfile.lock

Lines changed: 0 additions & 273 deletions
This file was deleted.

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pelican>=4.0.0
2+
markdown
3+
ghp-import
4+
icalendar

templates/article.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ <h2>
5959
{%- for event in events_list %}
6060
{%- if event.metadata['title'] == article.title %}
6161
<h2>Event Details</h2>
62-
<p><b>Location</b>: {{event.metadata['event-location']}}<br>
62+
{%- set location = event.metadata['event-location'] %}
63+
<p><b>Location</b>: <a href="{{mapify(location)}}">{{location}}</a><br>
6364
<b>Date</b>:
6465
<time datetime=" {{ event.metadata['event-start'] }}">
6566
<script>document.write(moment("{{ event.metadata['event-start'] }}").format('LLLL'));</script>

0 commit comments

Comments
 (0)