Basic sorting by tag

This commit is contained in:
Shylie 2024-01-14 04:28:46 +00:00
parent af52a2c23f
commit 347fab9ccd
7 changed files with 34 additions and 24 deletions

View File

@ -3,7 +3,7 @@ layout: default
--- ---
<h1> <h1>
{{ page.title }} - Shylie - {{ page.date | date_to_string }} - <a href="/"><-</a> {{ page.title }} - Shylie - {{ page.date | date_to_string }} - <a href="javascript:window.history.back();"><-</a>
</h1> </h1>
{{ content }} {{ content }}

View File

@ -1,5 +1,6 @@
--- ---
layout: post layout: post
tags: test2
--- ---
This is a test post but 2. This is a test post but 2.

View File

@ -1,5 +1,6 @@
--- ---
layout: post layout: post
tags: test1 test2
--- ---
This is a test post. This is a test post.

View File

@ -3,12 +3,10 @@ layout: default
title: Posts title: Posts
--- ---
<h1>Latest Posts</h1> <h1>all posts - <a href="/tags.html">by tag</a></h1>
<ul> <ul>
{% for post in site.posts %} {% for post in site.posts %}
<li> <li><a href="{{ post.url }}">{{ post.title }}</a></li>
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
</li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -85,3 +85,15 @@ a:hover {
background: #FF8; background: #FF8;
color: #900; color: #900;
} }
ul {
list-style-type: none;
}
ul li {
margin: 5px;
}
ul li a {
left: -20px;
}

15
tags.html Normal file
View File

@ -0,0 +1,15 @@
---
layout: default
title: Posts by Tag
---
<h1><a href="/">home</a></h1>
{% for tag in site.tags %}
<h2>{{ tag[0] }}</h2>
<ul>
{% for post in tag[1] %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>shylie.info</title>
<link rel="stylesheet" href="resources/style.css">
</head>
<body>
<div>
<h1>Header Text...</h1>
<h2>Header 2 Text...</h2>
<p>Lorem ipsum nec feugiat proin dictumst felis odio, netus sollicitudin tempus facilisis faucibus amet, netus venenatis mollis ultrices quisque arcu. Fames molestie purus nibh malesuada in etiam, bibendum auctor mollis donec volutpat felis purus, tellus litora vehicula nullam praesent. Curabitur quisque gravida tincidunt a commodo auctor fames hac massa vel eleifend quisque torquent, aliquam orci arcu aenean hac pellentesque sit amet integer ultricies quam.</p>
<p class="block">Eu ullamcorper hendrerit ad convallis sociosqu orci ipsum rhoncus egestas, vehicula litora per risus proin velit aenean amet duis, porttitor sagittis massa aptent nostra tellus mollis magna. Bibendum integer cursus etiam sollicitudin et consectetur ad tellus conubia netus, sodales sapien vehicula rhoncus dictumst egestas pellentesque sem. Magna et vel torquent commodo mauris eget a, molestie ornare taciti turpis litora urna felis, platea posuere donec imperdiet suscipit posuere.</p>
<p>Some more text and this time it's got a <a href="">link</a> and that's pretty cool.</p>
<p class="block">Even more text (in a block this time) and wow another <a href="">link</a> omg.</p>
</div>
</body>
</html>