Skip to content

Commit

Permalink
add extra dirs, fix up post
Browse files Browse the repository at this point in the history
  • Loading branch information
galtay committed Jan 4, 2025
1 parent be0479b commit 6c1cd06
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 59 deletions.
13 changes: 10 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ description: >- # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "/til"
url: "https://galtay.github.io/til"
twitter_username: gabrielaltay
github_username: galtay
minimal_mistakes_skin: default
Expand All @@ -29,7 +31,7 @@ markdown: kramdown
remote_theme: mmistakes/minimal-mistakes
# Outputting
permalink: /:categories/:title/
paginate: 5 # amount of posts to show
paginate: 10 # amount of posts to show
paginate_path: /page:num/
timezone: # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Expand Down Expand Up @@ -71,6 +73,9 @@ author:
- label: "GitHub"
icon: "fab fa-fw fa-github"
url: "https://github.com/galtay"
- label: "LinkedIn"
icon: "fab fa-fw fa-linkedin"
url: "https://www.linkedin.com/in/gabriel-altay"

footer:
links:
Expand All @@ -80,6 +85,9 @@ footer:
- label: "GitHub"
icon: "fab fa-fw fa-github"
url: "https://github.com/galtay"
- label: "LinkedIn"
icon: "fab fa-fw fa-linkedin"
url: "https://www.linkedin.com/in/gabriel-altay"


defaults:
Expand Down Expand Up @@ -109,5 +117,4 @@ tag_archive:
type: liquid
path: /tags/

baseurl: "/til" # Leave empty for user repositories
url: "https://galtay.github.io/til" # Replace with your GitHub username

7 changes: 7 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
main:
- title: "Posts"
url: /posts/
- title: "Categories"
url: /categories/
- title: "Tags"
url: /tags/
8 changes: 8 additions & 0 deletions _pages/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Page Not Found"
excerpt: "Page not found. Your pixels are in another canvas."
sitemap: false
permalink: /404.html
---

Sorry, but the page you were trying to view does not exist.
6 changes: 6 additions & 0 deletions _pages/category-archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Posts by Category"
layout: categories
permalink: /categories/
author_profile: true
---
6 changes: 6 additions & 0 deletions _pages/tag-archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Posts by Tag"
permalink: /tags/
layout: tags
author_profile: true
---
6 changes: 6 additions & 0 deletions _pages/year-archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Posts by Year"
permalink: /posts/
layout: posts
author_profile: true
---
56 changes: 0 additions & 56 deletions _posts/2024-01-04-setup-jekyll.md

This file was deleted.

81 changes: 81 additions & 0 deletions _posts/2025-01-04-setup-jekyll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: "setting up static github pages site with jekyll"
date: 2025-01-04
tags: jekyll
---

This is how I setup a static Jekyll site hosted with github pages.
I was working on Ubuntu for this.
The code is hosted at [https://github.com/galtay/til](https://github.com/galtay/til)
and the site is hosted at [https://galtay.github.io/til/](https://galtay.github.io/til/).

# Setup Ruby

Install a Ruby version manager.
I used [rbenv](https://github.com/rbenv/rbenv){:target="_blank"}.

```bash
sudo apt install rbenv
```

Add the following init command to `~/.zshrc` and source it.

``` bash
eval "$(rbenv init -)"
```

Configure a specific version of Ruby.

``` bash
rbenv install 3.1.2
rbenv local 3.1.2
rbenv rehash
```

# Setup Minimal Mistakes Theme

The minimal-mistakes theme by [Michael Rose](https://mademistakes.com/) is great!

* [main repo](https://github.com/mmistakes/minimal-mistakes)
* [starter repo](https://github.com/mmistakes/mm-github-pages-starter)
* [docs](https://mmistakes.github.io/minimal-mistakes)

I began with the starter repo and simply updated the links in `_config.yml` and started writing posts.
In particular I added,

``` yaml
baseurl: "/til"
url: "https://galtay.github.io/til"
```
This is needed when publishing a project based github pages site as opposed to a user based site.
[more here](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites).
Posts can be written in markdown and the flavor of markdown used is
[kramdown](https://kramdown.gettalong.org/syntax.html).
# Run Locally
Install bundler
``` bash
gem install bundler
```

Install project dependencies

``` bash
bundle install
```

Run the site locally

``` bash
bundle exec jekyll serve
```

# Publish from git branch

I setup my repo to deploy from the `main` branch.
I did this by navigating to Settings/Pages/Build and deployment and choosing `Deploy from a branch`.
When I'm happy with the local changes I push to the `main` branch and the site is automatically deployed.

0 comments on commit 6c1cd06

Please sign in to comment.