Skip to content

Commit

Permalink
hugo init
Browse files Browse the repository at this point in the history
  • Loading branch information
duplabe committed Apr 3, 2024
1 parent 9bd2242 commit e460235
Show file tree
Hide file tree
Showing 28 changed files with 255 additions and 19 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: github pages

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true

- name: Build
run: hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
cname: duplabe.com
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# Temporary lock file while building
/.hugo_build.lock
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

6 changes: 6 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

15 changes: 15 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
baseURL: 'https://duplabe.com'
languageCode: 'en-us'
title: 'Balázs Benyó'
theme: 'duplabe'
enableEmoji: true
taxonomies: [ ]

params:
dateFormat: "January 2, 2006"
showPostSummary: true
mainSections: [ 'about' ]
markup:
goldmark:
renderer:
unsafe: true
15 changes: 15 additions & 0 deletions content/about/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "About me"
ShowPostSummary: true
type: "about"
---

Hey :wave:,

My name is Balázs.

I've been working as a Software Engineer since 2008.

Currently, my focus is on Cloud Native Computing, Platform Engineering, and Go at [Bitrise](https://bitrise.io).

Feel free to contact me on my [LinkedIn](https://www.linkedin.com/in/balazsbenyo/).
18 changes: 0 additions & 18 deletions index.html

This file was deleted.

6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>duplabe/renovate-config"
]
}
Binary file added static/favicon/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions static/favicon/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/favicon/android-chrome-192x192.png?v=1","sizes":"192x192","type":"image/png"},{"src":"/favicon/android-chrome-512x512.png?v=1","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
2 changes: 2 additions & 0 deletions themes/duplabe/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
+++
+++
6 changes: 6 additions & 0 deletions themes/duplabe/assets/css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions themes/duplabe/assets/css/bootstrap.min.css.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions themes/duplabe/assets/css/fontawesome-free/css/all.min.css

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions themes/duplabe/assets/css/style.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
\:root
--duplabe-font-weight: 200
--bs-body-font-weight: var(--duplabe-font-weight)

--bs-body-color: #000

a
text-decoration: none

h1, h2, h3, h4, h5, h6
font-weight: var(--duplabe-font-weight)

.container
max-width: 700px

.navbar
--bs-navbar-nav-link-padding-x: 1rem
font-size: 1.4rem

ul
width: 100%

.navbar-expand .navbar-nav .nav-link
padding-left: 0

.navbar-nav
--bs-nav-link-color: var(--bs-link-color)
--bs-nav-link-hover-color: var(--bs-link-hover-color)

.single
font-size: 1.1rem

.fas
font-size: 1rem
opacity: .3
1 change: 1 addition & 0 deletions themes/duplabe/layouts/_default/_markup/render-link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span class="text-nowrap"><a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}" {{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text }}</a>{{ if strings.HasPrefix .Destination "http" }} <i title="external link" class="fas fa-external-link-alt"></i>{{ end }}</span>
44 changes: 44 additions & 0 deletions themes/duplabe/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">

{{ if .Page.Title }}
<title>{{ .Page.Title }}</title>
<meta name="description" content="{{ .Page.Title }}">
{{ else }}
<title>{{ .Site.Title }}</title>
<meta name="description" content="{{ .Site.Title }}">
{{ end }}

{{ $style := resources.Get "css/bootstrap.min.css" | fingerprint }}
<link href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" rel="stylesheet">

{{ $style := resources.Get "css/fontawesome-free/css/all.min.css" | fingerprint }}
<link href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" rel="stylesheet">
{{ $style := resources.Get "css/fontawesome-free/webfonts/fa-solid-900.ttf" }}
{{ $style.Publish }}
{{ $style := resources.Get "css/fontawesome-free/webfonts/fa-solid-900.woff2" }}
{{ $style.Publish }}

{{ $style := resources.Get "css/style.sass" | toCSS | minify | fingerprint }}
<link href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" rel="stylesheet">

<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png?v=1">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png?v=1">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png?v=1">
<link rel="manifest" href="/favicon/site.webmanifest?v=1">

<link rel="alternate" type="application/rss+xml" href="{{ .Site.BaseURL }}/posts/index.xml" title="duplabe"/>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-12">
{{- block "main" . }}{{- end }}
</div>
</div>
</div>
</body>
</html>
18 changes: 18 additions & 0 deletions themes/duplabe/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- define "main" -}}

<h1>{{ .Title | markdownify }}</h1>
<p>
<small class="text-secondary">
{{ if .PublishDate }}
{{ .PublishDate.Format .Site.Params.DateFormat }}
{{ end}}
{{ if lt .Lastmod .PublishDate }}
, updated {{ .Lastmod.Format .Site.Params.DateFormat }}
{{ end}}
</small>
</p>
<div class="single">
{{ .Content }}
</div>

{{- end -}}
23 changes: 23 additions & 0 deletions themes/duplabe/layouts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- define "main" -}}

{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}

{{ range $pages.ByPublishDate }}
<h1>{{ .Title | markdownify }}</h1>
<p>
<small class="text-secondary">
{{ if .PublishDate }}
{{ .PublishDate.Format .Site.Params.DateFormat }}
{{ end}}
{{ if lt .Lastmod .PublishDate }}
, updated {{ .Lastmod.Format .Site.Params.DateFormat }}
{{ end}}
</small>
</p>
<div class="single">
{{ .Content }}
</div>

{{ end }}

{{- end -}}
24 changes: 24 additions & 0 deletions themes/duplabe/layouts/shortcodes/img.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{ $size := .Get "size" }}
{{ $image := resources.Get (.Get "src")}}
{{ $image = $image.Fit $size }}

{{ with $image }}
<div class="text-md-start text-center">
<figure class="figure float-md-end ms-lg-2">
{{ $alt := $.Get "alt" }}
<img
class="rounded"
src="{{ .RelPermalink }}"
width="{{ .Width }}"
height="{{ .Height }}"
{{ if $alt}}
alt="{{ $alt }}"
title="{{ $alt }}"
{{ end }}
/>
{{ if $alt}}
<figcaption class="figure-caption text-end">{{ $.Get "alt" }}</figcaption>
{{ end }}
</figure>
</div>
{{ end }}
8 changes: 8 additions & 0 deletions vendors.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/zsh

wget https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css -O themes/duplabe/assets/css/bootstrap.min.css
wget https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css.map -O themes/duplabe/assets/css/bootstrap.min.css.map

wget https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css -O themes/duplabe/assets/css/fontawesome-free/css/all.min.css
wget https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/webfonts/fa-solid-900.woff2 -O themes/duplabe/assets/css/fontawesome-free/webfonts/fa-solid-900.woff2
wget https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/webfonts/fa-solid-900.ttf -O themes/duplabe/assets/css/fontawesome-free/webfonts/fa-solid-900.ttf

0 comments on commit e460235

Please sign in to comment.