mirror of
				https://github.com/valentineus/popov.link.git
				synced 2025-11-04 06:49:45 +03:00 
			
		
		
		
	Simplified data generation code
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
		@@ -3,9 +3,9 @@
 | 
				
			|||||||
<ul>
 | 
					<ul>
 | 
				
			||||||
    {% for contact in site.data.contacts %}
 | 
					    {% for contact in site.data.contacts %}
 | 
				
			||||||
    <li>
 | 
					    <li>
 | 
				
			||||||
        <a href="{{ contact.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}" target="_blank">{{ contact.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</a>
 | 
					        <a href="{{ contact.url | relative_url | uri_escape }}" target="_blank">{{ contact.title | strip | normalize_whitespace | xml_escape }}</a>
 | 
				
			||||||
        <span>—</span>
 | 
					        <span>—</span>
 | 
				
			||||||
        <span>{{ contact.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</span>
 | 
					        <span>{{ contact.description | strip | normalize_whitespace | xml_escape }}</span>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% endfor %}
 | 
					    {% endfor %}
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,20 +8,20 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    <!-- Advanced meta tags -->
 | 
					    <!-- Advanced meta tags -->
 | 
				
			||||||
    {% for tag in site.data.meta_tags %}
 | 
					    {% for tag in site.data.meta_tags %}
 | 
				
			||||||
    <meta name="{{ tag.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" content="{{ tag.content | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
 | 
					    <meta name="{{ tag.name | strip | normalize_whitespace | xml_escape }}" content="{{ tag.content | strip | normalize_whitespace | xml_escape }}" />
 | 
				
			||||||
    {% endfor %}
 | 
					    {% endfor %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- Open Graph -->
 | 
					    <!-- Open Graph -->
 | 
				
			||||||
    <meta property="og:title" content="{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
 | 
					    <meta property="og:title" content="{{ page.title | default: site.title | strip | normalize_whitespace | xml_escape }}" />
 | 
				
			||||||
    <meta property="og:description" content="{{ page.description | default: site.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
 | 
					    <meta property="og:description" content="{{ page.description | default: site.description | strip | normalize_whitespace | xml_escape }}" />
 | 
				
			||||||
    <meta property="og:type" content="{{ page.layout | replace: 'post', 'article' | replace: 'page', 'website' | default: 'website' }}" />
 | 
					    <meta property="og:type" content="{{ page.layout | replace: 'post', 'article' | replace: 'page', 'website' | default: 'website' }}" />
 | 
				
			||||||
    <meta property="og:image" content="{{ page.image | absolute_url | uri_escape }}" />
 | 
					    <meta property="og:image" content="{{ page.image | absolute_url | uri_escape }}" />
 | 
				
			||||||
    <meta property="og:url" content="{{ page.url | absolute_url | uri_escape }}" />
 | 
					    <meta property="og:url" content="{{ page.url | absolute_url | uri_escape }}" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- Title / Description -->
 | 
					    <!-- Title / Description -->
 | 
				
			||||||
    <meta name="application-name" content="{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
 | 
					    <meta name="application-name" content="{{ page.title | default: site.title | strip | normalize_whitespace | xml_escape }}" />
 | 
				
			||||||
    <meta name="description" content="{{ page.description | default: site.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
 | 
					    <meta name="description" content="{{ page.description | default: site.description | strip | normalize_whitespace | xml_escape }}" />
 | 
				
			||||||
    <title>{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</title>
 | 
					    <title>{{ page.title | default: site.title | strip | normalize_whitespace | xml_escape }}</title>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- CSS -->
 | 
					    <!-- CSS -->
 | 
				
			||||||
    <link rel="stylesheet" href="{{ '/assets/css/styles.css' | relative_url | uri_escape }}" />
 | 
					    <link rel="stylesheet" href="{{ '/assets/css/styles.css' | relative_url | uri_escape }}" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,9 +3,9 @@
 | 
				
			|||||||
<ul>
 | 
					<ul>
 | 
				
			||||||
    {% for link in site.data.links %}
 | 
					    {% for link in site.data.links %}
 | 
				
			||||||
    <li>
 | 
					    <li>
 | 
				
			||||||
        <a href="{{ link.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}" target="_blank">{{ link.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</a>
 | 
					        <a href="{{ link.url | relative_url | uri_escape }}" target="_blank">{{ link.title | strip | normalize_whitespace | xml_escape }}</a>
 | 
				
			||||||
        <span>—</span>
 | 
					        <span>—</span>
 | 
				
			||||||
        <span>{{ link.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</span>
 | 
					        <span>{{ link.description | strip | normalize_whitespace | xml_escape }}</span>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% endfor %}
 | 
					    {% endfor %}
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,8 +3,8 @@
 | 
				
			|||||||
<ul>
 | 
					<ul>
 | 
				
			||||||
    {% for post in site.posts %}
 | 
					    {% for post in site.posts %}
 | 
				
			||||||
    <li>
 | 
					    <li>
 | 
				
			||||||
        <a href="{{ post.url | relative_url | uri_escape }}">{{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</a>
 | 
					        <a href="{{ post.url | relative_url | uri_escape }}">{{ post.title | strip | normalize_whitespace | xml_escape }}</a>
 | 
				
			||||||
        (<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%d-%m-%Y' | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</time>)
 | 
					        (<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%d-%m-%Y' | strip | normalize_whitespace | xml_escape }}</time>)
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% endfor %}
 | 
					    {% endfor %}
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@ layout: compress
 | 
				
			|||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!DOCTYPE html>
 | 
					<!DOCTYPE html>
 | 
				
			||||||
<html lang="{{ site.lang | strip_newlines | strip_html | strip | slugify }}">
 | 
					<html lang="{{ site.lang | strip | slugify | xml_escape }}">
 | 
				
			||||||
    {% include head.html %}
 | 
					    {% include head.html %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <body>
 | 
					    <body>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ layout: default
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<main class="container">
 | 
					<main class="container">
 | 
				
			||||||
    <header>
 | 
					    <header>
 | 
				
			||||||
        <h1>{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</h1>
 | 
					        <h1>{{ page.title | default: site.title | strip | normalize_whitespace | xml_escape }}</h1>
 | 
				
			||||||
    </header>
 | 
					    </header>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {{ content }}
 | 
					    {{ content }}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,15 +5,15 @@ layout: default
 | 
				
			|||||||
<article class="container">
 | 
					<article class="container">
 | 
				
			||||||
    <small>
 | 
					    <small>
 | 
				
			||||||
        <span>Published</span>
 | 
					        <span>Published</span>
 | 
				
			||||||
        <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: '%Y-%m-%d' | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</time>
 | 
					        <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: '%Y-%m-%d' | strip | normalize_whitespace | xml_escape }}</time>
 | 
				
			||||||
        <span>on</span>
 | 
					        <span>on</span>
 | 
				
			||||||
        <a href="{{ site.url | absolute_url | uri_escape }}" target="_self">{{ site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</a>
 | 
					        <a href="{{ site.url | absolute_url | uri_escape }}" target="_self">{{ site.title | strip | normalize_whitespace | xml_escape }}</a>
 | 
				
			||||||
        <span>|</span>
 | 
					        <span>|</span>
 | 
				
			||||||
        <a href="{{ page.url | absolute_url | uri_escape }}" target="_blank">Permalink</a>
 | 
					        <a href="{{ page.url | absolute_url | uri_escape }}" target="_blank">Permalink</a>
 | 
				
			||||||
    </small>
 | 
					    </small>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <header>
 | 
					    <header>
 | 
				
			||||||
        <h1>{{ site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</h1>
 | 
					        <h1>{{ site.title | strip | normalize_whitespace | xml_escape }}</h1>
 | 
				
			||||||
    </header>
 | 
					    </header>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {{ content }}
 | 
					    {{ content }}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user