Using song ID (again) and manually setting all titles

This commit is contained in:
Norbi Peti 2019-06-13 03:41:03 +02:00
parent 322c294080
commit a4216b63fb
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
6 changed files with 7 additions and 7 deletions

View file

@ -17,7 +17,7 @@ baseurl: /HiddenSounds
page_gen: page_gen:
- data: songs - data: songs
template: song template: song
name: sname name: sid
- data: artists - data: artists
template: artist template: artist
name: sname name: sname

View file

@ -14,6 +14,6 @@
{{ artistName }} {{ artistName }}
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% comment %} Space needed {% endcomment %} - <a href="{{ site.baseurl }}/{{ song.sname | datapage_url: 'songs' }}">{{ song.sname }}</a> {% comment %} Space needed {% endcomment %} - <a href="{{ site.baseurl }}/{{ song.sid | datapage_url: 'songs' }}">{{ song.sname }}</a>
</p> </p>
</div> </div>

View file

@ -1,6 +1,6 @@
--- ---
layout: default layout: default
title: page.name title: '{{ page.sname }}'
ptitle: '{{ page.sname }}' ptitle: '{{ page.sname }}'
--- ---
<h2>{{ page.position }}</h2> <h2>{{ page.position }}</h2>
@ -16,6 +16,6 @@ ptitle: '{{ page.sname }}'
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if found == false %} {% continue %} {% endif %} {% if found == false %} {% continue %} {% endif %}
<li><a href="{{ site.baseurl }}/songs{{ song.sname | datapage_url: songs }}">{{ song.artists | join: ", " }} - {{ song.sname }}</a></li> <li><a href="{{ site.baseurl }}/songs{{ song.sid | datapage_url: songs }}">{{ song.artists | join: ", " }} - {{ song.sname }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>

View file

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{{ page.title }} - HS Fanpage</title> <title>{{ page.title | flatify }} - HS Fanpage</title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">

View file

@ -1,5 +1,5 @@
--- ---
layout: default layout: default
title: asd title: '{{ page.sname }}'
ptitle: '{{ page.artists | join: ", " }} - {{ page.sname }}' ptitle: '{{ page.artists | join: ", " }} - {{ page.sname }}'
--- ---

View file

@ -49,7 +49,7 @@ module Jekyll
self.process(@name) self.process(@name)
self.read_yaml(File.join(base, '_layouts'), template + ".html") self.read_yaml(File.join(base, '_layouts'), template + ".html")
self.data['title'] = data[name] # self.data['title'] = data[name] - EDITED
# add all the information defined in _data for the current record to the # add all the information defined in _data for the current record to the
# current page (so that we can access it with liquid tags) # current page (so that we can access it with liquid tags)
self.data.merge!(data) self.data.merge!(data)