Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 61 additions & 17 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,23 +1,67 @@
** Cycle
[[https://travis-ci.org/asimpson/cycle.svg?branch=master]]

♻ A static site generator written in Common Lisp that works for me and probably no one else.

*** Folder structure
#+BEGIN_SRC
.
├── pages
├── posts
├── public
│   ├── images
│   └── js
└── templates
└── partials
♻ A Hugo theme ported from the Cycle static site generator.

*** Overview
Cycle is now a Hugo theme that maintains the same clean, minimal design as the original Common Lisp static site generator. The theme includes support for:
- Blog posts with RSS feeds
- Custom pages (e.g., /uses, /support)
- Archive page listing all posts
- Link posts with external URLs
- Responsive design using Tachyons CSS

*** Installation

**** Using the theme in your Hugo site
1. Add the theme to your Hugo site:
#+BEGIN_SRC bash
cd your-hugo-site
git submodule add https://github.com/asimpson/cycle.git themes/cycle
#+END_SRC

2. Update your ~hugo.toml~ or ~config.toml~:
#+BEGIN_SRC toml
theme = "cycle"

[permalinks]
post = "/writing/:slug/"
#+END_SRC

3. Add CSS files to your site's ~assets/~ directory:
- ~tachyons.css~ - Main CSS framework
- ~custom.css~ - Site-specific styles

**** Running the example site
#+BEGIN_SRC bash
cd themes/cycle/exampleSite
hugo server
#+END_SRC

*** Pre-built binaries
Currently there are pre-built binaries for Linux and macOS in [[https://github.com/asimpson/cycle/releases][Releases]].
*** Content Structure
- Posts go in ~content/post/~ with frontmatter:
#+BEGIN_SRC yaml
---
title: "Post Title"
date: 2024-01-01T10:00:00-05:00
slug: post-slug
excerpt: "Post excerpt for listings and RSS"
---
#+END_SRC

- Pages go in ~content/page/~ with similar frontmatter
- The archive page is created by adding ~content/archive/_index.md~

*** Link Posts
To create a link post (external link), add a ~link~ parameter to the frontmatter:
#+BEGIN_SRC yaml
---
title: "External Article"
date: 2024-01-01T10:00:00-05:00
slug: external-article
link: "https://example.com/article"
---
#+END_SRC

*** Compile binary
**** sbcl
~make~
*** Original Common Lisp Version
The original Common Lisp static site generator has been replaced by this Hugo theme. If you need the legacy version, see git history or releases.
138 changes: 138 additions & 0 deletions themes/cycle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Cycle Hugo Theme

A minimal, clean Hugo theme ported from the [Cycle static site generator](https://github.com/asimpson/cycle).

## Features

- Clean, minimal design using Tachyons CSS
- RSS feed support
- Archive page for all posts
- Support for link posts (external URLs)
- Responsive layout
- Custom pages (e.g., /uses, /support)

## Installation

### As a Git Submodule

```bash
cd your-hugo-site
git submodule add https://github.com/asimpson/cycle.git themes/cycle
```

### Configuration

Update your `hugo.toml`:

```toml
baseURL = "https://example.com/"
languageCode = "en-us"
title = "Your Site Title"
theme = "cycle"

[params]
description = "Your site description"

[permalinks]
post = "/writing/:slug/"

[outputs]
home = ["HTML", "RSS"]

[outputFormats.RSS]
mediatype = "application/rss+xml"
baseName = "rss"

[services.rss]
limit = 20
```

### CSS Files

Copy or create these CSS files in your site's `assets/` directory:
- `tachyons.css` - Main CSS framework
- `custom.css` - Site-specific styles

You can find example CSS files in `themes/cycle/assets/`.

## Content Structure

### Posts

Posts go in `content/post/` with YAML frontmatter:

```yaml
---
title: "Post Title"
date: 2024-01-01T10:00:00-05:00
lastmod: 2024-01-01T10:00:00-05:00
slug: post-slug
excerpt: "Post excerpt for listings and RSS"
---

Your post content here...
```

### Link Posts

To create a link post (pointing to external content):

```yaml
---
title: "External Article"
date: 2024-01-01T10:00:00-05:00
slug: external-article
excerpt: "Description of the external article"
link: "https://example.com/article"
---

Optional commentary about the link...
```

### Pages

Regular pages go in `content/page/`:

```yaml
---
title: "About"
permalink: "/about"
excerpt: "About this site"
type: "page"
---

Page content...
```

### Archive Page

Create an archive section by adding `content/archive/_index.md`:

```yaml
---
title: "Archive"
---
```

## Example Site

An example site with sample content is available in `exampleSite/`. To run it:

```bash
cd themes/cycle/exampleSite
hugo server
```

## Customization

The theme uses several partials that can be overridden:

- `layouts/partials/head.html` - HTML head content
- `layouts/partials/header.html` - Site header with navigation
- `layouts/partials/footer.html` - Site footer
- `layouts/partials/logo.html` - Site logo SVG
- `layouts/partials/post_body.html` - Individual post layout

## License

GPLv3 - See LICENSE file for details.
79 changes: 79 additions & 0 deletions themes/cycle/assets/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
pre {
padding: 1rem;
font-size: 1rem;
font-family: "Hack", "Courier New", "monospace";
overflow-y: scroll;
}

.logo {
width: 88px;
}

.logo svg .circle {
fill: #137752;
}

.logo svg .row {
fill: #9EEBCF;
}

p a, blockquote a, article a, ul a {
color: #137752;
opactiy: 1;
transition: opacity .15s ease-in;
}

blockquote a:hover, blockquote a:focus, article a:hover, article a:focus {
opacity: .5;
transition: opacity .15s ease-in;
}

blockquote a:active, article a:active {
opacity: .8;
transition: opacity .15s ease-out;
}

article h2, article h3, article h4 {
margin: 0;
color: rgba(0,0,0,.9);
}

.as-mw7 {
/* matches .mw7 */
max-width: 38rem;
}

blockquote {
border-left: 2px solid #137752;
padding-left: 1rem;
margin-left: 0;
}

.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; }
.embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

figure {
margin-left: 0;
margin-right: 0;
}

video {
width: 100%;
}

@media(max-width: 360px) {
.nav-link {
display: block;
margin-top: .5rem;
}
}

aside a {
color: #111111;
opactiy: 1;
transition: opacity .15s ease-in;
}

aside h3 {
font-size: 1.3rem;
}
2 changes: 2 additions & 0 deletions themes/cycle/assets/tachyons.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions themes/cycle/exampleSite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public/
Empty file.
3 changes: 3 additions & 0 deletions themes/cycle/exampleSite/content/archive/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: "Archive"
---
18 changes: 18 additions & 0 deletions themes/cycle/exampleSite/content/page/support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: "Support"
permalink: "/support"
excerpt: "Ways to support me and the blog via affiliate links."
type: "page"
---
# Support

I use the following services just about every day and they all offer discounts or other incentives for folks to recommend the service to other people. Signing up for one of these services using the links below helps support me and this blog. Thanks!

## Fastmail
I've been a [Fastmail](https://www.fastmail.com/?STKI=14274077) user for years now and I don't have a single complaint about the service or company. Highly recommended if all you care about is IMAP service that "just works."

## Hover
Years ago I switched from GoDaddy to [Hover](https://hover.com/U84GCox3) and haven't looked back. They're a great, no-frills DNS service.

## Backblaze
I've been using [Backblaze](https://secure.backblaze.com/r/01c40o) for years and absolutely love the service and company. Not only is their product top-notch but the data they publish about [hard drive reliability](https://www.backblaze.com/b2/hard-drive-test-data.html) is incredibly useful.
37 changes: 37 additions & 0 deletions themes/cycle/exampleSite/content/page/uses.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "Uses"
permalink: "/uses"
excerpt: "A evolving list of hardware and software that I use."
type: "page"
---
# Uses

*Author's note: I 100% stole this format from the incredible [usesthis][uses] site. Check it out.*

**What hardware do you use?**

At work I use a [desktop workstation](/writing/new-workstation) running [NixOS](https://nixos.org/) and an Intel 12600k. I game via a Windows 11 VM and a Nvidia 3060 passed through to that VM.

I love typing on my <s>[Anne Pro](https://www.amazon.com/Anne-PRO-Mechanical-Keyboard-Programmable/dp/B07J4HH6YZ)</s> [GMMK Pro](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black) mechanical keyboard with Gazzew U4 Boba switches for a quieter feel.

My phone is an iPhone 14. It's fine.

**And what software?**

<s>I'm a [big][dotfiles] user of [Emacs][emacs]. I use [mu4e](https://www.djcbsoftware.nl/code/mu/mu4e.html) for email, [org-mode](https://orgmode.org/) for tasks and notes, [Ivy](https://github.com/abo-abo/swiper) for auto-complete, [magit](https://magit.vc/) for git, [ivy-feedwrangler](/writing/introducing-ivy-feedwrangler) for RSS.</s> I've switched to VSCode since the support for all the various LSPs and debug tools is just better at the moment.

Linux apps I use on my work laptop are: [Signal](https://www.signal.org/), [Tilix](https://gnunn1.github.io/tilix-web/) or [Alacritty](https://github.com/jwilm/alacritty) for terminals, [rofi](https://github.com/davatorium/rofi) for launching, and [i3wm](https://github.com/i3/i3) as my window manager.

Mac specific apps I use: [Alfred](https://www.alfredapp.com/), [MenuMeters](https://github.com/yujitach/MenuMeters), [1Password](https://1password.com/), [Moom](https://manytricks.com/moom/), [Turbo Boost Switcher Pro](http://tbswitcher.rugarciap.com/), and [Hammerspoon](https://github.com/Hammerspoon/hammerspoon).

My browser of choice is Firefox.

I enjoy writing code in [Javascript/Node](https://nodejs.org/en/), [Golang](https://go.dev/), [Ruby](https://www.ruby-lang.org/en/), [Common Lisp](https://common-lisp.net/), and recently [Rust](https://www.rust-lang.org/).

**Any online services?**

As far as online services go I use [Netlify](https://www.netlify.com) (at the moment) to host this site, [Hover](https://hover.com/U84GCox3) for domains, [Fastmail](https://www.fastmail.com/?STKI=14274077) for email, [yarr](https://github.com/nkanaev/yarr) manages my RSS feeds, and I use [Backblaze](https://secure.backblaze.com/r/01c40o) for online backup.

[uses]: https://usesthis.com/
[dotfiles]: https://github.com/asimpson/dotfiles/tree/master/emacs
[emacs]: https://www.gnu.org/software/emacs/
Loading