diff --git a/.travis.yml b/.travis.yml index db46b20..4879aca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,9 @@ cache: - $HOME/.cache/pip before_install: - git lfs pull - - make install-sassc install: - "pip install Lektor" - - make sass + - make build script: "lektor build" before_deploy: "echo 'c3woc.de ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC5NslYj+wtriBuKIxJfDRm9E2hnlstWR8durQ6pKvVvP7wjcoXIyAxe41GvJ9SoEhSjF7oVlzlw+zAkzl5WOZ4=' > ~/.ssh/known_hosts" deploy: diff --git a/Makefile b/Makefile index 8fb809e..717beda 100644 --- a/Makefile +++ b/Makefile @@ -3,28 +3,32 @@ LEKTOR_SERVER_FLAGS=-h 127.0.0.1 all: build sass: - ./sassc/bin/sassc -t compressed ./assets/sass/main.scss ./assets/css/main.min.css - ./sassc/bin/sassc -t compressed ./assets/sass/ie9.scss ./assets/css/ie9.min.css lektor clean --yes - lektor build - -sass-uncompressed: - ./sassc/bin/sassc ./assets/sass/main.scss ./assets/css/main.css - ./sassc/bin/sassc ./assets/sass/ie9.scss ./assets/css/ie9.css - lektor clean --yes - lektor build + lektor server -f jsminify +.ONESHELL: install: - if hash apt 2>/dev/null; then sudo apt update; sudo apt install imagemagick python3 python3-pip -y; elif hash pacman 2>/dev/null; then sudo pacman -Sy graphicsmagick glibc lib32-glibc python python-pip --noconfirm; elif hash dnf 2>/dev/null; then sudo dnf install -y ImageMagick python3 python3-pip; else echo -e "Please install Imagemagick, Python3 and Pip!"; fi + if hash apt-get 2>/dev/null; then + sudo apt-get update -qq >/dev/null && sudo apt-get install -qq apt-utils imagemagick python3-pip python3-setuptools gcc + elif hash pacman 2>/dev/null; then + sudo pacman -Syu imagemagick python-pip glibc lib32-glibc gcc --noconfirm + elif hash dnf 2>/dev/null; then + sudo dnf install -y ImageMagick python3-pip gcc + else + echo -e "Please install Imagemagick, python3-pip and gcc" + fi pip install lektor --user - make install-sassc + # pip3 install wheel --user + lektor plugin flush-cache install-sassc: - if [ ! -d './sassc' ]; then git clone https://github.com/sass/sassc.git sassc; . sassc/script/bootstrap ; make -C sassc -j4 ; fi + lektor plugin flush-cache + lektor clean --yes + lektor build -f jsminify -build: sass - lektor build +build: + lektor clean --yes + lektor build -f jsminify server: lektor server $(LEKTOR_SERVER_FLAGS) - diff --git a/c3woc-podcast.lektorproject b/c3woc-podcast.lektorproject index 281f679..db438bb 100644 --- a/c3woc-podcast.lektorproject +++ b/c3woc-podcast.lektorproject @@ -2,6 +2,7 @@ name = c3woc-webseite url = https://podcast.c3woc.de/ url_style = absolute +excluded_assets = sass, sass/*, *.scss [servers.c3woc] name = c3woc @@ -22,3 +23,5 @@ name = Englisch locale = en_US url_prefix = /en/ +[packages] +lektor-scsscompile = 1.0.1 diff --git a/configs/scsscompile.ini b/configs/scsscompile.ini new file mode 100644 index 0000000..9569ef1 --- /dev/null +++ b/configs/scsscompile.ini @@ -0,0 +1,3 @@ +source_dir = assets/sass/ +output_dir = assets/css/ +output_style = compressed diff --git a/content/contents.lr b/content/contents.lr index e1d541f..1c1309d 100644 --- a/content/contents.lr +++ b/content/contents.lr @@ -99,3 +99,5 @@ icons_header_2: Waffel nicht nur schmecken icons_text_2: Durch den Waffelpodcast ist es nun endlich auch möglich, die Waffel nicht nur zu sehen, zu fühlen und zu schmecken, sondern auch akustisch vorgestellt zu bekommen. --- icons_2_url: https://www.ccc.de/de/regional +--- +mp3feed: yes diff --git a/databags/nav-bar.ini b/databags/nav-bar.ini index b22e884..d5519cc 100644 --- a/databags/nav-bar.ini +++ b/databags/nav-bar.ini @@ -14,4 +14,4 @@ Alle-Beitraege = '/eisen/' RSS-Feed = '/podcast-he.xml' [list] -Blog = '/eisen/' +Das heisse Eisen = '/eisen/' diff --git a/models/start.ini b/models/start.ini index 2f8e714..ad1917e 100644 --- a/models/start.ini +++ b/models/start.ini @@ -27,6 +27,11 @@ type = string label = Start-Hinweis-URL type = string +[fields.mp3feed] +label = Link zum MP3 Feed? +type = boolean + + ;------------------------------ [fields.about_header] diff --git a/templates/feed_podcast-he.xml b/templates/feed_podcast-he.xml index 80b8c51..ec62e4b 100644 --- a/templates/feed_podcast-he.xml +++ b/templates/feed_podcast-he.xml @@ -1,35 +1,82 @@ -{%- set baseurl = "https://podcast.c3woc.de/" %}{% -set search = "eisen" %} - - {% - if bag('translate', this.alt, 'hefeed') %}{{ bag('translate', this.alt, 'hefeed') }}{% - else %}Das heisse Eisen{% endif %} - {{ baseurl }}podcast-he.xml - {{ none|datetimeformat('YYYY-MM-ddThh:mm:ss') }}Z - - - - {% if this.author %}{{ this.author }}{% else %}Venty und L3D{% endif %} - {% - set pages = site.query('/eisen').include_undiscoverable(true).all() %}{% - for page in pages %}{% if not page._hidden %} - - {{ page.title }} - {{ baseurl }}{{ search }}/{{ page._id }} - {{ page.pub_date|datetimeformat('YYYY-MM-ddThh:mm:ss') }}Z - - - {% if page.author %}{{ page.author }}{% else %}L3D{% endif %} - - - {{ page.xml }} - {%- if page.xml_img -%} - <img width="23%" src="{{ page.xml_img }}" /> - {% endif %} - <br/><a href="{{ baseurl }}{{ page|url }}{{ page.podcastmp3 }}" class="button special primary" download>{{ page.shorttitle }} - MP3 Downloaded</a> - - -{% endif %}{% -endfor %} - +{%- set baseurl = "https://podcast.c3woc.de" %} +{%- set search = "eisen" %} + + + + {%- if bag('translate', this.alt, 'hefeed') -%} + {{ bag('translate', this.alt, 'hefeed') }} + {%- else -%} + Das heisse Eisen + {%- endif -%} + {{ baseurl }}/ + {{ baseurl }}/podcast-he.xml + + {%- if bag('translate', this.alt, 'hefeed_description') -%} + {{ bag('translate', this.alt, 'hefeed_description') }} + {%- else -%} + Der Waffelpodcast: 'Das heisse Eisen'. Mit Venty und L3D. + {%- endif -%} + + Von Hand als Jinja2 Template von L3D geschrieben + de + L3D + {{ none|datetimeformat('YYYY-MM-ddThh:mm:ss') }}Z + {%- set pages = site.query('/eisen').include_undiscoverable(true).all() -%} + {%- for page in pages -%} + {%- if not page._hidden %} +{# #} 2019- +{# #} {{ none|datetimeformat('YYYY-MM-ddThh:mm:ss') }}Z +{# #} L3D +{# #} Ventys Podcast +{# #} + {%- if bag('translate', this.alt, 'hefeed_description') -%} + {{ bag('translate', this.alt, 'hefeed_description') }} + {%- else -%} + Der Waffelpodcast: 'Das heisse Eisen'. Mit Venty und L3D. + {%- endif -%} + +{# #} + {%- if bag('translate', this.alt, 'hefeed_keywords') -%} + {{ bag('translate', this.alt, 'hefeed_keywords') }} + {%- else -%} + Waffel, C3WOC, CCC, Chaos, Waffle, Waffles, Waffeln, VOC, WOC, Operation, Center + {%- endif -%} + +{# #} no +{# #} +{# #} L3D +{# #} l3d@c3woc.de +{# #} +{# #} {{ baseurl }}/podcast-he.xml +{# #} no +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} {{ page.title }} +{# #} {{ baseurl }}/{{ search }}/{{ page._id }}/ +{# #} + {%- if page.author -%} + {{ page.author }} + {%- else -%} + L3D und Venty + {%- endif -%} + +{# #} {{ page.pub_date|datetimeformat('YYYY-MM-ddThh:mm:ss') }}Z +{# #} +{# #} {{ page._id }} +{# #} no +{# #} + {{ page.xml }} + {%- if page.xml_img -%} + <img width="23%" src="{{ page.xml_img }}" /> + {% endif %} + <br/><a href="{{ baseurl }}{{ page|url }}{{ page.podcastmp3 }}" class="button special primary" download>{{ page.shorttitle }} - MP3 Downloaded</a> + +{# #} + {%- endif -%} + {%- endfor %} + + diff --git a/templates/start.html b/templates/start.html index 063907c..0beeb1b 100644 --- a/templates/start.html +++ b/templates/start.html @@ -9,6 +9,9 @@

{{ this.title }}

{{ this.slogan }}

{{ this.hinweis }} {% if this.hinweis_txt %}{{ this.hinweis_txt }}{% endif %}

+ {%- if this.mp3feed %} +
Podcast RSS Feed + {%- endif %}