tonybtw.com
tonybtw.com
https://git.tonybtw.com/tonybtw.com.git
git://git.tonybtw.com/tonybtw.com.git
added readme tab and fixed readme accordingly
Diff
diff --git a/content/community/example.md b/content/community/example.md
new file mode 100644
index 0000000..a0622f4
--- /dev/null
+++ b/content/community/example.md
@@ -0,0 +1,69 @@
+---
+title: "Example Community Article: My Minimal DWM Rice"
+date: 2025-09-15
+author: your-handle
+tags: ["dwm", "rice", "linux", "dotfiles"]
+# Put this file at: content/community/<your-title>.md
+# Screenshots should live under: static/img/community/<your-name>/
+---
+
+> This is an example of how to contribute to the **community** section of tonybtw.com.
+> Share a Linux tip, a rice showcase, or a small guide others will enjoy.
+
+---
+
+## Short Description
+A lightweight DWM setup using JetBrainsMono Nerd Font, Gruvbox colors, and a few small patches.
+
+## Screenshots
+Place images in the repo at:
+```
+static/img/community/<your-name>/<file>.png
+```
+
+Then reference them in your Markdown like this (Hugo will serve from `/img/...`):
+```
+
+```
+
+
+## What This Is
+- A quick write-up of your setup or tutorial.
+- Keep it reproducible and concise.
+- Link out to full dotfiles instead of dumping huge configs here.
+
+## Steps / Explanation
+1) Install DWM from source.
+
+2) Apply a couple of patches (e.g., vanity gaps, systray).
+ Example snippet for fonts in `config.h`:
+```
+static const char *fonts[] = {
+ "JetBrainsMono Nerd Font Mono:style=Bold:size=14",
+};
+```
+
+3) Set some Gruvbox colors in `config.h`:
+```
+static const char col_gray1[] = "#282828";
+static const char col_gray2[] = "#3c3836";
+static const char col_gray3[] = "#ebdbb2";
+```
+
+4) Rebuild and start DWM. Include a short note on any keybinds you changed and why.
+
+## Tips for Good Submissions
+- Use fenced code blocks (three backticks) for configs and commands.
+- Add 1–2 screenshots (compressed PNG/JPEG/WebP is best).
+- Include a one-sentence summary at the top and a few tags.
+
+## Links
+- Full dotfiles: https://github.com/yourname/dotfiles
+- DWM homepage: https://dwm.suckless.org
+
+---
+**File placement recap**
+- This file: `content/community/example.md`
+- Your images: `static/images/community/<your-handle>/...`
+- In Markdown, link images as: `/images/community/<your-handle>/<file>.png`
+
diff --git a/layouts/community/list.html b/layouts/community/list.html
new file mode 100644
index 0000000..18619cd
--- /dev/null
+++ b/layouts/community/list.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <link rel="icon" type="image/png" href="/img/favicon.png" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <title>{{ .Title }}</title>
+ <link rel="stylesheet" href="/css/site.css" />
+</head>
+<body>
+
+ {{ partial "header.html" . }}
+ <main class="container">
+ <h1 class="site-post-title center" style="margin-bottom: 2rem;">Community</h1>
+
+ <div class="tutorial-grid">
+ {{ $paginator := .Paginate .Pages }}
+ {{ range $page := $paginator.Pages }}
+ <div class="tutorial-card">
+ <!-- No image on cards for community -->
+ <h4 class="tutorial-card-title" style="margin-top:0;">
+ <a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a>
+ </h4>
+ {{ with $page.Params.author }}
+ <p class="tutorial-card-author" style="margin:.15rem 0; color:#666;">By {{ . }}</p>
+ {{ end }}
+ <p class="tutorial-card-date">{{ $page.Date.Format "January 2, 2006" }}</p>
+ {{ with $page.Description }}
+ <p class="tutorial-card-description">{{ . }}</p>
+ {{ end }}
+ </div>
+ {{ end }}
+ </div>
+
+ {{ if gt $paginator.TotalPages 1 }}
+ <div style="margin-top: 2rem; text-align: center;">
+ {{ template "_internal/pagination.html" . }}
+ </div>
+ {{ end }}
+ </main>
+</body>
+</html>
+
diff --git a/layouts/community/single.html b/layouts/community/single.html
new file mode 100644
index 0000000..9da485f
--- /dev/null
+++ b/layouts/community/single.html
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta
+ name="viewport"
+ content="width=device-width, initial-scale=1"
+ />
+ <meta
+ name="author"
+ content="{{ with .Params.author }}{{ . }}{{ else }}Tony, btw.{{ end }}"
+ />
+ <link rel="icon" type="image/png" href="/img/favicon.png" />
+ <!-- <link rel="stylesheet" href="/css/code.css" /> -->
+ <link rel="stylesheet" href="/css/site.css" />
+ <title>{{ .Title }}</title>
+ </head>
+ <body>
+
+ {{ partial "header.html" . }}
+
+ <main class="container">
+ <style>
+ p img {
+ display: block;
+ max-width: 80rem;
+ width: 100%;
+ height: auto;
+ margin: 1rem auto;
+ border-radius: 8px;
+ }
+ </style>
+ <div class="row" style="display: flex; align-items: flex-start; gap: 2rem;">
+
+ <!-- Main Content -->
+ <div class="column" style="flex: 1;">
+ <article class="site-post">
+ <h1 class="site-post-title center">{{ .Title }}</h1>
+
+ <p class="site-post-meta center">
+ {{ with .Params.author }}By {{ . }} · {{ end }}
+ {{ (.Date).Format "01/02/2006" }}
+ </p>
+
+ {{/* Pick screenshot/hero image from multiple possible params:
+ 1) .Params.images[0]
+ 2) .Params.image
+ 3) .Params.screenshot
+ */}}
+ {{ $img := "" }}
+ {{ with .Params.images }}{{ if gt (len .) 0 }}{{ $img = index . 0 }}{{ end }}{{ end }}
+ {{ if and (eq $img "") .Params.image }}{{ $img = .Params.image }}{{ end }}
+ {{ if and (eq $img "") .Params.screenshot }}{{ $img = .Params.screenshot }}{{ end }}
+
+ {{ with $img }}
+ <div class="post-hero">
+ <img src="{{ . | relURL }}" alt="{{ $.Title }}" loading="lazy" />
+ </div>
+ {{ end }}
+
+ {{ if .Params.video }}
+ <div class="video">
+ <iframe
+ src="https://www.youtube.com/embed/{{ .Params.video }}"
+ allowfullscreen
+ ></iframe>
+ </div>
+ {{ end }}
+
+ <div id="content" class="mb-10">
+ {{ .Content }}
+ </div>
+ </article>
+ </div>
+
+ <!-- Sidebar TOC -->
+ {{ if gt (len .TableOfContents) 80 }}
+ <aside class="content-panel"
+ style="flex: 0 0 250px; max-width: 250px; position: sticky; top: 100px; align-self: flex-start;">
+ <div class="pb-3">
+ <strong class="text-xl">Table of Contents</strong>
+ </div>
+ <div id="tableOfContentContainer" style="max-height: calc(100vh - 8rem); overflow-y: auto;">
+ {{ .TableOfContents }}
+ </div>
+ </aside>
+ {{ end }}
+
+ </div>
+ </main>
+ </body>
+</html>
+
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 92aee44..ac096c2 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -15,9 +15,10 @@
<!-- Desktop Nav -->
<ul id="nav-menu" class="nav-menu">
- <li class="nav-item"><a class="nav-link" href="/">Home</a></li>
+ <!-- <li class="nav-item"><a class="nav-link" href="/">Home</a></li> -->
<li class="nav-item"><a class="nav-link" href="/support/">Support</a></li>
<li class="nav-item"><a class="nav-link" href="/tutorial/">Tutorials</a></li>
+ <li class="nav-item"><a class="nav-link" href="/community/">Community</a></li>
<div class="nav-right">
<a href="https://discord.gg/CXAz6m4sWE" class="discord-desktop-btn" target="_blank" rel="noopener">
<!-- 💬 Join Discord -->
@@ -36,6 +37,7 @@
<li><a class="mobile-nav-link" href="/">Home</a></li>
<li><a class="mobile-nav-link" href="/support/">Support</a></li>
<li><a class="mobile-nav-link" href="/tutorial/">Tutorials</a></li>
+ <li><a class="mobile-nav-link" href="/community/">Community</a></li>
<li class="mobile-nav-link">
<a href="https://discord.gg/CXAz6m4sWE" target="_blank" rel="noopener">Join Discord</a>
</li>
diff --git a/readme.org b/readme.org
index 38a42e4..020a9a9 100644
--- a/readme.org
+++ b/readme.org
@@ -3,6 +3,27 @@
* About
This is the source for [[https://tonybtw.com][tonybtw.com]], a Hugo-based static site.
The repository includes a =flake.nix= so you can get a reproducible Hugo environment with Nix.
+* Contributing
+There is a =/community/= section where people can share Linux tutorials, tips, or rices.
+
+1. Copy =example.md= from =content/community/= and rename it to your own article, e.g. =my-guide.md=.
+2. Edit the front matter and body to fit your content. Keep the same structure for consistency.
+ - Minimal front matter example:
+ #+BEGIN_SRC yaml
+ ---
+ title: "My Cool Setup"
+ author: "Your Name"
+ date: 2025-09-15
+ description: "A short blurb about your contribution."
+ image: "/img/community/your-name/screenshot.png"
+ ---
+ #+END_SRC
+3. Place any screenshots in your own folder under =static/img/community/<your-name>=.
+ - Example: =static/img/community/alice/my-screenshot.png=
+ - In your Markdown, reference them as =/img/community/alice/my-screenshot.png=.
+4. Submit a pull request with your Markdown file and images.
+
+This way, everyone’s contributions stay organized and easy to render.
* Requirements
- [[https://nixos.org/download.html][Nix]] installed
diff --git a/static/img/community/your-name/dwm-rice.png b/static/img/community/your-name/dwm-rice.png
new file mode 100644
index 0000000..15d311e
Binary files /dev/null and b/static/img/community/your-name/dwm-rice.png differ