feat: add blog #7

Open
anton wants to merge 15 commits from feat/blog into main
10 changed files with 89 additions and 9 deletions
Showing only changes of commit 6796aef993 - Show all commits

View File

@ -30,6 +30,7 @@ header_pages:
- about.md
- services.md
- tools.md
- blog.md
- contact.md
style: dark # dark (default), light or hacker
@ -40,6 +41,7 @@ footer: '2023 Distrust, LLC'
# Build settings
theme: jekyll-theme-console
Review

Doesn't this normally generate files/links in the format blog/:title/index.html?

Doesn't this normally generate files/links in the format `blog/:title/index.html`?
permalink: /:title/
# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to

View File

@ -1,4 +1,4 @@
<footer style="height: 40px">
<span><img src="assets/base/distrust-white.svg" width="20px" alt="copyleft"/></span> {{ site.footer }}
<span><img src="../assets/base/distrust-white.svg" width="20px" alt="copyleft"/></span> {{ site.footer }}
anton marked this conversation as resolved Outdated
Outdated
Review

This should use site absolute path

/assets/base/distrust-white.svg
This should use site absolute path ``` /assets/base/distrust-white.svg ```
Review

Would be good to use the jekyll built-in function for static assets

Would be good to use the jekyll built-in function for static assets
<script type="text/javascript" src="/assets/js/main.js"></script>
</footer>

View File

@ -35,6 +35,9 @@
<div>
<a href="/tools.html">Tools</a>
</div>
<div>
<a href="/blog.html">Blog</a>
</div>
<div>
<a href="/contact.html">Contact</a>
</div>

View File

@ -3,7 +3,7 @@
<div class="menu">
<div>
<a id="home-link" href="/index.html">
<img class="menu-logo" src="assets/base/distrust-text-white.svg"
<img class="menu-logo" src="../assets/base/distrust-text-white.svg"
anton marked this conversation as resolved Outdated
Outdated
Review

Same here

Same here
alt="Distrust broken chain logo with white text" />
</a>
</div>

27
_layouts/post.html Normal file
View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: en }}">
{%- include head.html -%}
<body>
<div class="container">
{%- include header.html -%}
<article class="post">
<h1>{{ page.title }}</h1>
<div class="entry">
{{ content }}
</div>
<div class="date">
Written on {{ page.date | date: "%B %e, %Y" }}
</div>
</article>
{%- include footer.html -%}
</div>
</body>
</html>

View File

@ -0,0 +1,19 @@
---
layout: post
title: Distrust - Trust But Verify
---
## Bacon Ipsum
anton marked this conversation as resolved Outdated
Outdated
Review

Absolute path

Absolute path
Bacon ipsum dolor amet porchetta brisket pork loin, cupim pork belly frankfurter landjaeger andouille ground round hamburger corned beef tri-tip short loin. Ribeye andouille bacon pork leberkas doner. Meatloaf capicola brisket hamburger tongue chuck. Tail ham prosciutto, beef ribs beef frankfurter flank strip steak tenderloin.
Chislic flank fatback, tri-tip short loin tenderloin ground round boudin venison bacon porchetta short ribs jowl doner bresaola. Doner frankfurter chislic, t-bone tongue leberkas cupim burgdoggen salami ribeye. Ham hock ham flank filet mignon beef ribs andouille. Pork loin tongue leberkas cupim short loin bacon cow.
Kielbasa ham hock ground round pig meatloaf chuck porchetta. Meatball boudin drumstick hamburger. Beef ribs capicola frankfurter, t-bone pork beef chuck ham hock tail bresaola kevin pig. Kevin spare ribs porchetta beef pig landjaeger pork shankle. Pork loin turkey strip steak kielbasa porchetta meatball turducken hamburger pork ball tip tri-tip chislic sausage.
![whale shark](../assets/images/whale_shark.jpg)
## Second Title
Sirloin hamburger leberkas pig. Kielbasa doner picanha kevin. Meatball tenderloin ham hock spare ribs strip steak picanha tail drumstick t-bone pork loin venison flank rump. Turkey drumstick picanha t-bone, filet mignon fatback pork belly tail venison boudin shankle ribeye pancetta. Bacon meatball pig, pork loin t-bone ball tip meatloaf fatback cupim tenderloin.
Doner pork pastrami, frankfurter t-bone kevin chislic chuck. Meatball short loin meatloaf spare ribs prosciutto brisket. Biltong kielbasa boudin pig jowl shankle swine frankfurter turducken pancetta buffalo kevin chislic pork chop flank. Cow alcatra meatball, fatback tenderloin porchetta tri-tip prosciutto chislic turducken biltong pig. Sirloin strip steak t-bone, swine sausage turducken alcatra filet mignon landjaeger burgdoggen capicola salami pork loin short ribs jerky. Pork chop hamburger strip steak, meatloaf sirloin picanha ground round pancetta andouille shoulder tenderloin bresaola. Jowl venison pork burgdoggen, ball tip swine doner pig frankfurter tongue ribeye meatball drumstick.

View File

@ -891,6 +891,15 @@ pre {
}
/** end carousel */
/**
* Blog
*/
.post img {
max-width: 100%;
}
/** end blog */
*,
*::before,
*::after {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@ -10,13 +10,15 @@ collapsibleButton.addEventListener("click", function () {
});
document.addEventListener('DOMContentLoaded', function () {
fetch('../assets/js/carousel-items.json')
.then(response => response.json())
.then(data => {
createCarouselItems(data);
initializeCarousel();
})
.catch(error => console.error('Error loading JSON:', error));
if (window.location.pathname === "index.html") {
fetch('../assets/js/carousel-items.json')
anton marked this conversation as resolved Outdated
Outdated
Review

Absolute path

Absolute path
.then(response => response.json())
.then(data => {
createCarouselItems(data);
initializeCarousel();
})
.catch(error => console.error('Error loading JSON:', error));
}
});
function createCarouselItems(items) {

18
blog.md Normal file
View File

@ -0,0 +1,18 @@
---
layout: page
title: Blog
permalink: /blog.html
---
<div class="posts">
{% for post in site.posts %}
<article class="post">
<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
anton marked this conversation as resolved Outdated
Outdated
Review

I'd probably include the title in the link as well

<a ... title="{{ post.title}}>...</a>
I'd probably include the title in the link as well ``` <a ... title="{{ post.title}}>...</a> ```
<div class="entry">
{{ post.excerpt }}
</div>
<h4>Written on {{ post.date | date: "%B %e, %Y" }}</h4>
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
anton marked this conversation as resolved Outdated
Outdated
Review

Generally I'd avoid using the baseurl. This makes local development more difficult and prevents have multiple domains with the same content (eg. deploying as a Tor Hidden Service)

Generally I'd avoid using the baseurl. This makes local development more difficult and prevents have multiple domains with the same content (eg. deploying as a Tor Hidden Service)
</article>
{% endfor %}
</div>