mirror of
https://github.com/chylex/Blog.git
synced 2025-07-31 01:59:05 +02:00
Relativize URLs and tweak HTML
This commit is contained in:
parent
e1113eeaf6
commit
e5da6eb49f
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/.idea/
|
@ -1,18 +1,19 @@
|
||||
{% assign timestamp = site.time | date: "%s" %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ site.lang | default: "en-US" }}">
|
||||
<html lang="{{ site.lang | default: "en" }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{% seo %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#348fba">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
|
||||
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: timestamp | relative_url }}">
|
||||
</head>
|
||||
<body>
|
||||
<header class="page-header" role="banner">
|
||||
<h1 class="project-name">
|
||||
{% if page.titleimg %}
|
||||
<a href="https://chylex.com/" class="project-name-image"><img src="{{ page.titleimg }}" alt=""></a>
|
||||
<a href="https://chylex.com/" class="project-name-image"><img src="{{ page.titleimg | relative_url }}" alt=""></a>
|
||||
{% endif %}
|
||||
<span class="project-name-text">{{ page.title | default: site.title }}</span>
|
||||
</h1>
|
||||
@ -26,21 +27,21 @@
|
||||
<main id="content" class="main-content" role="main">
|
||||
{% if page.breadcrumbs %}
|
||||
<nav class="page-breadcrumbs">
|
||||
<a href="{{site.url}}">Home</a>
|
||||
<a href="{{ site.url }}{{ site.baseurl }}">Home</a>
|
||||
{% for crumb in page.breadcrumbs %}
|
||||
<span> » </span>
|
||||
|
||||
{% if crumb.type == 'self' %}
|
||||
{% assign url = page.permalink %}
|
||||
{% assign url = page.permalink | relative_url %}
|
||||
{% assign title = page.title %}
|
||||
{% elsif crumb.revlatest %}
|
||||
{% assign url = site.url | append: crumb.revlatest %}
|
||||
{% assign url = site.url | append: site.baseurl | append: crumb.revlatest %}
|
||||
{% assign title = page.title %}
|
||||
{% elsif crumb.revcurrent %}
|
||||
{% assign url = page.permalink %}
|
||||
{% assign url = page.permalink | relative_url %}
|
||||
{% assign title = 'revision ' | append: crumb.revcurrent %}
|
||||
{% elsif crumb.revcustom %}
|
||||
{% assign url = page.permalink %}
|
||||
{% assign url = page.permalink | relative_url %}
|
||||
{% assign title = crumb.revcustom %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -5,7 +5,7 @@ titleimg: /assets/img/avatar.png
|
||||
{% for post in paginator.posts %}
|
||||
<article>
|
||||
<div class="blog-entry-header">
|
||||
<h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
|
||||
<h1><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h1>
|
||||
<p class="date">{{ post.date | date: '%b %Y' }}</p>
|
||||
</div>
|
||||
<div class="blog-entry-content">{{ post.excerpt }}</div>
|
||||
@ -16,14 +16,14 @@ titleimg: /assets/img/avatar.png
|
||||
<nav class="pagination">
|
||||
<div>
|
||||
{% if paginator.previous_page_path %}
|
||||
<a href="{{ paginator.previous_page_path }}">‹ previous page</a>
|
||||
<a href="{{ paginator.previous_page_path | relative_url }}">‹ previous page</a>
|
||||
{% else %}
|
||||
<span class="inactive-link">‹ previous page</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{% if paginator.next_page_path %}
|
||||
<a href="{{ paginator.next_page_path }}">next page ›</a>
|
||||
<a href="{{ paginator.next_page_path | relative_url }}">next page ›</a>
|
||||
{% else %}
|
||||
<span class="inactive-link">next page ›</span>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user