Skip to content

Commit

Permalink
Tried changing the post layout
Browse files Browse the repository at this point in the history
  • Loading branch information
legoraft committed Sep 25, 2024
1 parent 85dcab6 commit 5a6aaac
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 4 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ defaults:
path: ""
values:
layout: "default"

excerpt_separator: <!--more-->

plugins:
- jekyll-feed
Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-05-17-power-of-github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "The power of github actions"
categories: misc
---

I've recently started using Github actions a lot more due to my new ongoing project called [stagnant](https://github.com/legoraft/stagnant). This static site generator allows you to create a statically generated blog site (mainly to use with github pages). I wanted to create a project in rust for a long time to learn a bit more about the language. The best way to do that is by building something you'd actually use, so you'll work on it.
I've recently started using Github actions a lot more due to my new ongoing project called [stagnant](https://github.com/legoraft/stagnant). <!--more--> This static site generator allows you to create a statically generated blog site (mainly to use with github pages). I wanted to create a project in rust for a long time to learn a bit more about the language. The best way to do that is by building something you'd actually use, so you'll work on it.

Now on to Github actions. When I started on this project, I just wanted to be able to upload the built site (which resides in a `site` directory) to a github pages site and be able to browse the site from github pages. A lot of these static site generators use github actions for this and I chose to take a look at [mdbook](https://github.com/rust-lang/mdBook), which had quite a clear workflow to do this. After some fiddling around with this (it took 14 commits to get it working) I realised that I was using a MacOS build on a workflow that ran on a Linux container.

Expand Down
20 changes: 20 additions & 0 deletions _sass/body.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,31 @@

h1.posttitle {
font-size: 1.5rem;
margin: 1rem 0;
}

ul.postlist {
list-style: none;
margin: 0 1rem;

li {
display: flex;
}
}

span.date {
color: $unfocused;
margin-right: 1.5rem;
font-size: 0.9rem;
}

a.postlink {
color: inherit;
text-decoration: none;
font-weight: bold;

display: flex;
flex-direction: column;

&:hover {
text-decoration: underline;
Expand Down
3 changes: 2 additions & 1 deletion _sass/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

header {
height: 64px;
max-width: 100%;
max-width: 80%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 64px;
margin: auto;
color: $foreground;
}

Expand Down
1 change: 1 addition & 0 deletions _sass/variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
$background: #FDFFFC;
$foreground: #0D1321;
$unfocused: #70798F;
$accent: #AB92BF;

* {
Expand Down
8 changes: 6 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ title: Home

<h1 class="posttitle">Posts</h1>

<ul>
<ul class="postlist">
{% for post in site.posts %}
<li>
<h2><a class="postlink" href="{{ post.url }}">{{ post.title }}</a></h2>
<span class="date">{{ post.date | date_to_string }}</span>
<a class="postlink" href="{{ post.url }}">
<h3>{{ post.title }}</h3>
<p>{{ post.excerpt }}</p>
</a>
</li>
{% endfor %}
</ul>

0 comments on commit 5a6aaac

Please sign in to comment.