Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
daanbreur committed Aug 15, 2023
0 parents commit 19cba00
Show file tree
Hide file tree
Showing 117 changed files with 5,181 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deploy Hugo site to Pages

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.102.3
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/PaperMod"]
path = themes/PaperMod
url = https://github.com/adityatelange/hugo-PaperMod.git
Empty file added .hugo_build.lock
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blog.duckz.org
112 changes: 112 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
baseURL: https://blog.duckz.org
disablePathToLower: true
languageCode: en-us
title: DuckDynasty Blog
theme: PaperMod

googleAnalytics: G-W5MMZ6FK4P

enableRobotsTXT: true
buildDrafts: true
buildFuture: false
buildExpired: false

params:
env: production

title: "DuckDynasty"
description: "Cheesing CTF challenges across the world."
keywords: [Blog, Cybersecurity, Hacking, Programming, HackTheBox]
author: Us

DateFormat: "January 2, 2006"

defaultTheme: dark
disableThemeToggle: false

ShowReadingTime: true
ShowShareButtons: true
ShareButtons: ["linkedin", "twitter"]

ShowPostNavLinks: true
ShowBreadCrumbs: true
ShowCodeCopyButtons: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
disableSpecial1stPost: false
disableScrollToTop: false
comments: false
hidemeta: false
hideSummary: true
showtoc: false
tocopen: false

label:
text: "Home"

profileMode:
enabled: true # needs to be explicitly set

socialIcons:
- name: github
url: "https://github.com/duckz-org"
- name: hackthebox
url: "https://app.hackthebox.com/teams/overview/5313"
- name: ctftime
url: "https://ctftime.org/team/228090"

cover:
hidden: true # hide everywhere but not in structured data
hiddenInList: true # hide on list pages and home
hiddenInSingle: false # hide on single page

# editPost:
# URL: "https://github.com/daanbreur/blog/content"
# Text: "Suggest Changes" # edit text
# appendFilePath: true # to append file path to Edit link

fuseOpts:
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 0.4
minMatchCharLength: 0
keys: ["title", "permalink", "summary", "content"]

menu:
main:
- identifier: posts
name: Posts
url: /post/
weight: 10
- identifier: search
name: Search
url: /search/
weight: 20
- identifier: categories
name: Categories
url: /categories/
weight: 30
- identifier: tags
name: Tags
url: /tags/
weight: 40

# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma
pygmentsUseClasses: true
markup:
highlight:
noClasses: false
# anchorLineNos: true
# codeFences: true
# guessSyntax: true
lineNos: true
# style: monokai

outputs:
home:
- HTML
- RSS
- JSON
6 changes: 6 additions & 0 deletions content/search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Search"
layout: "search"
summary: "search"
placeholder: "Search here for the best articles"
---
58 changes: 58 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{{- define "main" }}

<article class="post-single">
<header class="post-header">
{{ partial "breadcrumbs.html" . }}
<h1 class="post-title">
{{ .Title }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
</div>
{{- end }}
{{- if not (.Param "hideMeta") }}
<div class="post-meta">
{{- partial "post_meta.html" . -}}
{{- partial "translation_list.html" . -}}
{{- partial "edit_post.html" . -}}
{{- partial "post_canonical.html" . -}}
</div>
{{- end }}
</header>
{{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
{{- if (.Param "ShowToc") }}
{{- partial "toc.html" . }}
{{- end }}

{{- if .Content }}
<div class="post-content">
{{- if not (.Param "disableAnchoredHeadings") }}
{{- partial "anchored_headings.html" .Content -}}
{{- else }}{{ .Content }}{{ end }}
</div>
{{- end }}

<footer class="post-footer">
{{- $tags := .Language.Params.Taxonomies.tag | default "tags" }}
<ul class="post-tags">
{{- range ($.GetTerms $tags) }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
{{- if (.Param "ShowPostNavLinks") }}
{{- partial "post_nav_links.html" . }}
{{- end }}
{{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
{{- partial "share_icons.html" . -}}
{{- end }}
</footer>

{{- if (.Param "comments") }}
{{- partial "comments.html" . }}
{{- end }}
</article>

{{- end }}{{/* end main */}}
29 changes: 29 additions & 0 deletions layouts/partials/post_meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- $scratch := newScratch }}

{{- if not .Date.IsZero -}}
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
{{- end }}

{{- if (.Param "ShowReadingTime") -}}
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
{{- end }}

{{- if (.Param "ShowWordCount") -}}
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
{{- end }}

{{- with (partial "author.html" .) }}
{{- $scratch.Add "meta" (slice .) }}
{{- end }}

{{- if .Param "points" -}}
{{- $scratch.Add "meta" (printf "%d points" .Params.points) }}
{{- end }}

{{- if .Param "solves" -}}
{{- $scratch.Add "meta" (printf "%d solves" .Params.solves) }}
{{- end }}

{{- with ($scratch.Get "meta") }}
{{- delimit . "&nbsp;·&nbsp;" -}}
{{- end -}}
1 change: 1 addition & 0 deletions static/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blog.duckz.org
50 changes: 50 additions & 0 deletions themes/PaperMod/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''

---

<!--
## READ BEFORE OPENING ISSUES
Please fill the template below
- **DO NOT** ask for instructions.
- Use Discussions section if you need help
- See project wiki https://github.com/adityatelange/hugo-PaperMod/wiki
- Read FAQs section https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs
- Search for previous issues/ pull requests
-->

**Describe the bug**
<!-- A clear and concise description of what the bug is. -->

- Device/Os: [e.g. Android 10]
- Type: [e.g. Desktop/Mobile]
- Browser and version [e.g. Chrome 86.0]:
- Hugo Version [ >=0.83.0 expected]:
- Theme Version [e.g. v4.0, master, or commit-id ]:

**Steps to reproduce the behavior:**
<!--
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->

**Expected behavior**:
<!-- A clear and concise description of what you expected to happen. -->

**Repo/Source where this issue can be reproduced**:
<!-- Please link source code of website where the said issue can be reproduced -->

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->

**Additional context**
<!--Add any other context about the problem here. -->
5 changes: 5 additions & 0 deletions themes/PaperMod/.github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: PaperMod Discussions
url: https://github.com/adityatelange/hugo-PaperMod/discussions
about: Please ask and answer questions/doubts here, do not open an issue for questions.
7 changes: 7 additions & 0 deletions themes/PaperMod/.github/ISSUE_TEMPLATE/new-blank-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: New Blank Issue
about: Anything other than bug report
title: ""
labels: ""
assignees: ""
---
44 changes: 44 additions & 0 deletions themes/PaperMod/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!--
## READ BEFORE OPENING A PR
Thank you for contributing to hugo-PaperMod!
Please fill out the following questions to make it easier for us to review your
changes. You do not need to check all the boxes below.
**NOTE**: PaperMod does not have any external dependencies fetched from 3rd party
CDN servers. However we do have custom Head/Footer extender templates which you can use
to add those to your website.
https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#custom-head--footer
-->


**What does this PR change? What problem does it solve?**

<!--
Describe the changes and their purpose here, as detailed as and if needed.
Please do not add 2 unrelated changes in a single PR as it is difficult to track/revert those in future.
-->


**Was the change discussed in an issue or in the Discussions before?**

<!--
Link issues and relevant Discussions posts here.
If this PR resolves an issue on GitHub, use "Closes #1234" so that the issue
is closed automatically when this PR is merged.
-->


## PR Checklist

- [ ] This change adds/updates translations and I have used the [template present here](https://github.com/adityatelange/hugo-PaperMod/wiki/Translations#want-to-add-your-language-).
- [ ] I have enabled [maintainer edits for this PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork).
- [ ] I have verified that the code works as described/as intended.
- [ ] This change adds a Social Icon which has a permissive license to use it.
- [ ] This change **does not** include any CDN resources/links.
- [ ] This change **does not** include any unrelated scripts such as bash and python scripts.
- [ ] This change updates the overridden internal templates from HUGO's repository.
Loading

0 comments on commit 19cba00

Please sign in to comment.