Compare commits
22 Commits
cf4a2e4e2f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 72c39d33f0 | |||
| 8de384f428 | |||
| 7118cd33ea | |||
| 13b3a496a8 | |||
| 001597ad82 | |||
| 51d69487b9 | |||
| 98278c443a | |||
| b65424a810 | |||
| 158613cb52 | |||
| 65ea907c73 | |||
| b3ad6d7114 | |||
| 7c819bc923 | |||
| e001c18cf6 | |||
| 44cb4045ba | |||
| ea7688016a | |||
| 2682ee7e69 | |||
| b293e98184 | |||
| f9f5625d5a | |||
| f8037aa233 | |||
| 0ba6c52d33 | |||
| 58fb765ec4 | |||
| 74e7f63ad5 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,3 +1,7 @@
|
|||||||
.venv
|
.venv
|
||||||
.idea
|
.idea
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# Generated HTML files from markdown
|
||||||
|
site/*.html
|
||||||
|
!site/index.html
|
||||||
11
content/about.md
Normal file
11
content/about.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# About
|
||||||
|
|
||||||
|
Puercito Fiction is a series of creative projects linked from this same
|
||||||
|
homepage. For now, that is mainly web comics. The first of which is
|
||||||
|
[She's Perfect, Actually!](https://shes-perfect-actually.puercito.net),
|
||||||
|
a slice-of-gag strip following two silly ladies in a relationship.
|
||||||
|
Really, one web comic.
|
||||||
|
|
||||||
|
The person behind it all is happily hiding behind a curtain. Please pay no
|
||||||
|
attention them.
|
||||||
|
|
||||||
0
content/comics.md
Normal file
0
content/comics.md
Normal file
0
content/contact.md
Normal file
0
content/contact.md
Normal file
0
content/links.md
Normal file
0
content/links.md
Normal file
53
content/now.md
Normal file
53
content/now.md
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# "What are you up to now?"
|
||||||
|
|
||||||
|
This page describes what I am currently up to. You can find other
|
||||||
|
"Now" pages on [nownownow.com](https://nownownow.com).
|
||||||
|
|
||||||
|
> Updated on Thursday, 20th of November, 2025
|
||||||
|
|
||||||
|
# Getting Started
|
||||||
|
|
||||||
|
I am doing the preparation for Puercito Fiction: setting up the website(s), signing up for accounts,
|
||||||
|
figuring out a publishing workflow, etc.
|
||||||
|
|
||||||
|
Once all that is settled, I will focus on sharing what I am working on. By that, I mean more word-of-mouth stuff (e.g. family/friends, group chats, small
|
||||||
|
communities).
|
||||||
|
|
||||||
|
# Comics
|
||||||
|
|
||||||
|
I am publishing [She's Perfect, Actually!](https://shes-perfect-actually.puercito.net), a gag web comic about
|
||||||
|
a couple of silly ladies in a relationship.
|
||||||
|
|
||||||
|
This is moreso practice for getting into the regular habit of planning, drawing, and sharing entries on a regular basis. That said,
|
||||||
|
I do like the idea of the strip morphing into something a little more narrative driven and even experimental
|
||||||
|
at some point. For now, I am keeping things focused by making one strip per week. This is the easiest way to
|
||||||
|
manage with a day job consisting of weird hours and other hobbies I have outside this site.
|
||||||
|
|
||||||
|
## Eventually
|
||||||
|
|
||||||
|
I will be putting out a proper, narrative web comic. The current conundrum is figuring out which one. I am caught
|
||||||
|
between two ideas:
|
||||||
|
|
||||||
|
* A dramedy about a college freshmen who finds herself navigating life after they inexplicably being turned into a boy.
|
||||||
|
* A parable about a widow being banished from her village in post-Crusades Greece and being tormented by an unseen pursuer.
|
||||||
|
|
||||||
|
This being the internet, I wager which one of these would be more interesting to folks. Neither premise is intended to be
|
||||||
|
particularly long-lasting. Though, I am aware how infamous such intentions are for webcomics. That is why I am carefully
|
||||||
|
planning ahead.
|
||||||
|
|
||||||
|
These stories will be told vignette style, I reckon. Time is a precious thing and I want to tell the parts I care about.
|
||||||
|
|
||||||
|
This is all to say that both stories will be told! It is just a matter of which order and when. Watch this space.
|
||||||
|
|
||||||
|
# Planning
|
||||||
|
|
||||||
|
As you may have guessed, I have a lot on my mind for what to deliver. Write now I'm creating outlines and schedules.
|
||||||
|
Pretty soon I will be executing!
|
||||||
|
|
||||||
|
# Philosophy
|
||||||
|
|
||||||
|
I, like many people, am completely over platforms. Thus, I am striving to use smaller alternatives, ideally local.
|
||||||
|
Where I can, I am self-hosting solutions. For everything else, I am producing it myself.
|
||||||
|
|
||||||
|
More than anything, I am harkening back to a time where the internet was more informal, less important, and less
|
||||||
|
disruptive. A tad naive, but its a nice thought.
|
||||||
30
content/projects.md
Normal file
30
content/projects.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Projects
|
||||||
|
|
||||||
|
Outside of comics, I have a some things going on. More creative stuff, mostly technical.
|
||||||
|
|
||||||
|
# Witch Seasoning
|
||||||
|
|
||||||
|
I have been working on writing a novel. Actually, I have the first draft completed. 40% of its content has been
|
||||||
|
cut down from a word total of 130K words. Now I am onto the revising the work independently: consolidating plot
|
||||||
|
points, refining language, etc.
|
||||||
|
|
||||||
|
Once I am onto a second draft, I think I'll open up expressions of interest for beta readers. Watch this space!
|
||||||
|
|
||||||
|
# Sunday
|
||||||
|
|
||||||
|
Sunday is a convenient website template for webcomics. It does _all_ the things.
|
||||||
|
If you want to know in detail what it offers, checkout the [readme](https://git.puercito.net/mi/sunday).
|
||||||
|
Though, you're probably better off seeing it in action with [She's Perfect, Actually!](https://shes-perfect-actually.puercito.net)
|
||||||
|
|
||||||
|
This project was born from a need to have easily replicated features for my (eventual) web comics. Originally,
|
||||||
|
I was going to use [Rarebit](https://rarebit.neocities.org/). But when I found myself tinkering the code, I
|
||||||
|
found I was practically rewriting the whole thing. So, I started from scratch. It is still a wonderful tool,
|
||||||
|
though! Far friendlier to beginners than Sunday is, if I'm being honest.
|
||||||
|
|
||||||
|
# puercito.net
|
||||||
|
|
||||||
|
I consider the management of this site (and all subdomains) a project in and of itself. It's all sitting on a virtual machine where I manually
|
||||||
|
configure all the things. That's a heap of responsibility this day in age when you consider how many platforms automate
|
||||||
|
this stuff on your behalf. But I don't want to deal with them!
|
||||||
|
|
||||||
|
btw, the source code for this particular page is [open source](https://git.puercito.net/mi/hola).
|
||||||
83
content/uses.md
Normal file
83
content/uses.md
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
# "What do you use?"
|
||||||
|
|
||||||
|
It's always fun to see what tools other folks are using. This is my
|
||||||
|
page to do the same. What you see is what I use for my various projects.
|
||||||
|
|
||||||
|
> Updated on Thursday, 20th of November, 2025
|
||||||
|
|
||||||
|
# Art
|
||||||
|
|
||||||
|
For all of my digital drawing and painting, I use Procreate for iPad with an Apple Pencil. _Surprise, surprise._ Currently, I am
|
||||||
|
getting used to the [Comic Junkies Toolkit for Procreate](https://www.retrosupply.co/products/comic-junkies-toolkit-for-procreate)
|
||||||
|
by RetroSupply Co.
|
||||||
|
|
||||||
|
I _do_ have a [Huion Kamvas Pro 16](https://store.huion.com/au/products/kamvas-pro-16?srsltid=AfmBOop330FPZUb_-0OODk4V3Et1I4l8Fow6zcyjevSchmh_xz1M-rGy)
|
||||||
|
that I should be using (nice find from Facebook Marketplace). But my ambition to build a new desk
|
||||||
|
is in the way of that. I will probably start using [Krita](https://krita.org/en/) once that is finally done.
|
||||||
|
|
||||||
|
My physical painting is done with either oil paints or gouache.
|
||||||
|
|
||||||
|
## Anti-AI
|
||||||
|
|
||||||
|
It is by no means bulletproof, but [Glaze](https://glaze.cs.uchicago.edu/index.html) by the University of Chicago
|
||||||
|
is a promising tool for protecting images for AI training. Hopefully this paves the way for future platforms
|
||||||
|
that are more effective.
|
||||||
|
|
||||||
|
# Technical Stuff
|
||||||
|
|
||||||
|
## This Website
|
||||||
|
|
||||||
|
It's actually just an HTML website. _However,_ the page content is
|
||||||
|
generated from Markdown. The execution is done through a lil' Python
|
||||||
|
script.
|
||||||
|
|
||||||
|
## The Comics
|
||||||
|
|
||||||
|
My comics are served via a custom template, [Sunday](/projects.html#sunday).
|
||||||
|
The source code are stored is stored in my own [Gitea](https://about.gitea.com) instance.
|
||||||
|
Images and other assets are tracked with [Git LFS](https://git-lfs.com/).
|
||||||
|
|
||||||
|
## Infrastructure
|
||||||
|
|
||||||
|
Getting technical, everything under `puercito.net` is hosted in a virtual machine over at [BinaryLane](https://binarylane.com.au).
|
||||||
|
The sites are proxied on [Traefik Proxy](https://traefik.io/traefik), served through [Docker](https://docker.com).
|
||||||
|
[BunnyCDN](https://bunny.net/) distributes the content globally with included anti-DDoS. My domains are purchased through
|
||||||
|
[Namecheap](https://namecheap.com) who provides identity privacy. Their [PrivateEmail](https://www.namecheap.com/hosting/email/)
|
||||||
|
is a cost-effective solution.
|
||||||
|
|
||||||
|
I access the infrastructure with [TwinGate](https://www.twingate.com/), a really simple VPN-like thingy.
|
||||||
|
|
||||||
|
## Code
|
||||||
|
|
||||||
|
I subscribe annually to [JetBrains](https://www.jetbrains.com/). Mostly, PyCharm is the IDE I spend my time in
|
||||||
|
since that is my preferred platform. Occasionally I find myself in WebStorm. I don't do so much actual writing
|
||||||
|
of code so much as handing my requirements to [Claude Code](https://www.claude.com/product/claude-code) for
|
||||||
|
execution.
|
||||||
|
|
||||||
|
> To be **absolutely** clear, I _only_ use Claude for technical work!
|
||||||
|
|
||||||
|
## Software
|
||||||
|
|
||||||
|
My writing is done in [Scrivener](https://www.literatureandlatte.com/scrivener/overview). My works are backed up
|
||||||
|
to a free-tier DropBox account. Google Drive is where I store everything.
|
||||||
|
|
||||||
|
The newsletter is handled through [PencilBooth](https://pencilbooth.com/), a provider specifically tiered to visual artists.
|
||||||
|
|
||||||
|
I use a self-hosted instance of [Wekan](https://wekan.fi/) for the limited task management I do.
|
||||||
|
|
||||||
|
YouTube is where I go to listen to ambient stuff while working on my projects. I am particular fan of
|
||||||
|
[Aurora Heaven](https://www.youtube.com/@aurora.heaven18). Them is some vibes.
|
||||||
|
|
||||||
|
## Hardware
|
||||||
|
|
||||||
|
My laptop is a 2024 MacBook Pro 13" with an Apple M4 processor, 24GB memory. It usually sits on my lap. When I am
|
||||||
|
at my desk, I use my Logitech [POP Keys](https://www.logitech.com/en-au/shop/p/pop-keys-wireless-mechanical) and
|
||||||
|
[POP Mouse](https://www.logitech.com/en-au/shop/p/pop-wireless-mouse) gifted to me for Valentine's Day. I have a single
|
||||||
|
external monitor (not counting the Huion). The laptop sits closed and slotted into a timber stand I hand-made. Why yes,
|
||||||
|
I am not a multi-monitor person.
|
||||||
|
|
||||||
|
For focusing, I have a pair of [Sony WH1000XM3](https://store.sony.com.au/archived-headphones-noisecancelling/WH1000XM3B.html)
|
||||||
|
Wireless Noise Cancelling Headphones (White) to block out (external) distraction. The pads wore after several years of use. So,
|
||||||
|
I installed some [replacements from Amazon](https://www.amazon.com.au/dp/B0CTR2NKJS).
|
||||||
|
|
||||||
|
|
||||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
markdown>=3.4.0
|
||||||
220
scripts/build.py
Executable file
220
scripts/build.py
Executable file
@@ -0,0 +1,220 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Markdown to HTML converter for Puercito Fiction site.
|
||||||
|
Converts markdown files from content/ directory to HTML files in site/ directory.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
import markdown
|
||||||
|
|
||||||
|
|
||||||
|
# HTML template for generated pages
|
||||||
|
HTML_TEMPLATE = """<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{title} - Puercito Fiction</title>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Special+Elite&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
<style>
|
||||||
|
body.page {{
|
||||||
|
background-color: {bg_color};
|
||||||
|
background-image: none;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 2rem;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-container {{
|
||||||
|
max-width: 800px;
|
||||||
|
width: 100%;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.back-link {{
|
||||||
|
font-family: 'Special Elite', monospace;
|
||||||
|
font-size: 1rem;
|
||||||
|
color: #292929;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.back-link:hover {{
|
||||||
|
color: #E6507D;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content {{
|
||||||
|
font-family: 'Special Elite', monospace;
|
||||||
|
line-height: 1.8;
|
||||||
|
color: #191919;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content h1 {{
|
||||||
|
font-family: 'Permanent Marker', cursive;
|
||||||
|
font-size: 2.5rem;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
color: #191919;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content h2 {{
|
||||||
|
font-family: 'Permanent Marker', cursive;
|
||||||
|
font-size: 1.8rem;
|
||||||
|
margin-top: 2rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
color: #191919;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content h3 {{
|
||||||
|
font-family: 'Permanent Marker', cursive;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
color: #191919;
|
||||||
|
font-weight: 700;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content p {{
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content strong {{
|
||||||
|
font-weight: 700;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content a {{
|
||||||
|
color: #E6507D;
|
||||||
|
text-decoration: underline;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content a:hover {{
|
||||||
|
color: #c93d65;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content ul, .page-content ol {{
|
||||||
|
margin-left: 2rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content li {{
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content blockquote {{
|
||||||
|
margin: 1.5rem 0;
|
||||||
|
padding: 1rem 1.5rem;
|
||||||
|
border-left: 4px solid #E6507D;
|
||||||
|
background-color: rgba(230, 80, 125, 0.05);
|
||||||
|
font-style: italic;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content blockquote p {{
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.page-content blockquote p:last-child {{
|
||||||
|
margin-bottom: 0;
|
||||||
|
}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="page">
|
||||||
|
<div class="page-container">
|
||||||
|
<a href="index.html" class="back-link">← Back to Home</a>
|
||||||
|
<div class="page-content">
|
||||||
|
{content}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Page background colors (muted primary and secondary colors)
|
||||||
|
PAGE_COLORS = {
|
||||||
|
'about': '#f5e3d9', # muted peach
|
||||||
|
'comics': '#e3d9f5', # muted lavender
|
||||||
|
'projects': '#f5f5d9', # muted yellow
|
||||||
|
'links': '#d9f5e3', # muted teal
|
||||||
|
'contact': '#f5d9d9', # muted coral
|
||||||
|
'now': '#d9e3f5', # muted blue
|
||||||
|
'uses': '#f5dfe3', # muted peach-pink
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def convert_markdown_to_html(markdown_file: Path, output_dir: Path):
|
||||||
|
"""
|
||||||
|
Convert a single markdown file to HTML.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
markdown_file: Path to the markdown file
|
||||||
|
output_dir: Directory to save the HTML file
|
||||||
|
"""
|
||||||
|
# Read markdown content
|
||||||
|
with open(markdown_file, 'r', encoding='utf-8') as f:
|
||||||
|
md_content = f.read()
|
||||||
|
|
||||||
|
# Convert markdown to HTML
|
||||||
|
md = markdown.Markdown(extensions=['extra', 'codehilite', 'meta'])
|
||||||
|
html_content = md.convert(md_content)
|
||||||
|
|
||||||
|
# Extract title from filename or first heading
|
||||||
|
title = markdown_file.stem.capitalize()
|
||||||
|
|
||||||
|
# Get background color for this page (default to white if not specified)
|
||||||
|
page_name = markdown_file.stem
|
||||||
|
bg_color = PAGE_COLORS.get(page_name, '#ffffff')
|
||||||
|
|
||||||
|
# Fill template
|
||||||
|
full_html = HTML_TEMPLATE.format(
|
||||||
|
title=title,
|
||||||
|
content=html_content,
|
||||||
|
bg_color=bg_color
|
||||||
|
)
|
||||||
|
|
||||||
|
# Output file path
|
||||||
|
output_file = output_dir / f"{markdown_file.stem}.html"
|
||||||
|
|
||||||
|
# Write HTML file
|
||||||
|
with open(output_file, 'w', encoding='utf-8') as f:
|
||||||
|
f.write(full_html)
|
||||||
|
|
||||||
|
print(f"✓ Converted {markdown_file.name} → {output_file.name}")
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main build script."""
|
||||||
|
# Define directories
|
||||||
|
content_dir = Path('content')
|
||||||
|
site_dir = Path('site')
|
||||||
|
|
||||||
|
# Ensure directories exist
|
||||||
|
if not content_dir.exists():
|
||||||
|
print(f"Error: {content_dir} directory not found")
|
||||||
|
return
|
||||||
|
|
||||||
|
if not site_dir.exists():
|
||||||
|
print(f"Creating {site_dir} directory...")
|
||||||
|
site_dir.mkdir(parents=True)
|
||||||
|
|
||||||
|
# Find all markdown files
|
||||||
|
md_files = list(content_dir.glob('*.md'))
|
||||||
|
|
||||||
|
if not md_files:
|
||||||
|
print(f"No markdown files found in {content_dir}")
|
||||||
|
return
|
||||||
|
|
||||||
|
print(f"Found {len(md_files)} markdown file(s)")
|
||||||
|
print("-" * 50)
|
||||||
|
|
||||||
|
# Convert each markdown file
|
||||||
|
for md_file in md_files:
|
||||||
|
convert_markdown_to_html(md_file, site_dir)
|
||||||
|
|
||||||
|
print("-" * 50)
|
||||||
|
print(f"Build complete! HTML files saved to {site_dir}/")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
118
scripts/watch.py
Normal file
118
scripts/watch.py
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Watch script for Puercito Fiction site.
|
||||||
|
Monitors markdown files in content/ directory and automatically rebuilds when changes are detected.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
from pathlib import Path
|
||||||
|
from watchdog.observers import Observer
|
||||||
|
from watchdog.events import FileSystemEventHandler
|
||||||
|
|
||||||
|
# Add parent directory to path so we can import build script
|
||||||
|
sys.path.insert(0, str(Path(__file__).parent))
|
||||||
|
from build import convert_markdown_to_html, PAGE_COLORS
|
||||||
|
|
||||||
|
|
||||||
|
class MarkdownChangeHandler(FileSystemEventHandler):
|
||||||
|
"""Handler for markdown file changes."""
|
||||||
|
|
||||||
|
def __init__(self, content_dir: Path, site_dir: Path):
|
||||||
|
self.content_dir = content_dir
|
||||||
|
self.site_dir = site_dir
|
||||||
|
self.last_modified = {}
|
||||||
|
|
||||||
|
def on_modified(self, event):
|
||||||
|
"""Called when a file is modified."""
|
||||||
|
if event.is_directory:
|
||||||
|
return
|
||||||
|
|
||||||
|
file_path = Path(event.src_path)
|
||||||
|
|
||||||
|
# Only process .md files
|
||||||
|
if file_path.suffix != '.md':
|
||||||
|
return
|
||||||
|
|
||||||
|
# Debounce: ignore if file was modified less than 0.5 seconds ago
|
||||||
|
current_time = time.time()
|
||||||
|
if file_path in self.last_modified:
|
||||||
|
if current_time - self.last_modified[file_path] < 0.5:
|
||||||
|
return
|
||||||
|
|
||||||
|
self.last_modified[file_path] = current_time
|
||||||
|
|
||||||
|
print(f"\n📝 Change detected: {file_path.name}")
|
||||||
|
self._rebuild_file(file_path)
|
||||||
|
|
||||||
|
def on_created(self, event):
|
||||||
|
"""Called when a file is created."""
|
||||||
|
if event.is_directory:
|
||||||
|
return
|
||||||
|
|
||||||
|
file_path = Path(event.src_path)
|
||||||
|
|
||||||
|
# Only process .md files
|
||||||
|
if file_path.suffix != '.md':
|
||||||
|
return
|
||||||
|
|
||||||
|
print(f"\n✨ New file created: {file_path.name}")
|
||||||
|
self._rebuild_file(file_path)
|
||||||
|
|
||||||
|
def _rebuild_file(self, markdown_file: Path):
|
||||||
|
"""Rebuild a single markdown file."""
|
||||||
|
try:
|
||||||
|
convert_markdown_to_html(markdown_file, self.site_dir)
|
||||||
|
print(f"✅ Build successful at {time.strftime('%H:%M:%S')}")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Build failed: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main watch script."""
|
||||||
|
# Define directories
|
||||||
|
script_dir = Path(__file__).parent
|
||||||
|
project_dir = script_dir.parent
|
||||||
|
content_dir = project_dir / 'content'
|
||||||
|
site_dir = project_dir / 'site'
|
||||||
|
|
||||||
|
# Ensure directories exist
|
||||||
|
if not content_dir.exists():
|
||||||
|
print(f"❌ Error: {content_dir} directory not found")
|
||||||
|
return
|
||||||
|
|
||||||
|
if not site_dir.exists():
|
||||||
|
print(f"Creating {site_dir} directory...")
|
||||||
|
site_dir.mkdir(parents=True)
|
||||||
|
|
||||||
|
# Initial build
|
||||||
|
print("🏗️ Running initial build...")
|
||||||
|
print("-" * 50)
|
||||||
|
md_files = list(content_dir.glob('*.md'))
|
||||||
|
for md_file in md_files:
|
||||||
|
convert_markdown_to_html(md_file, site_dir)
|
||||||
|
print("-" * 50)
|
||||||
|
print(f"✅ Initial build complete! Built {len(md_files)} file(s)\n")
|
||||||
|
|
||||||
|
# Setup file watcher
|
||||||
|
event_handler = MarkdownChangeHandler(content_dir, site_dir)
|
||||||
|
observer = Observer()
|
||||||
|
observer.schedule(event_handler, str(content_dir), recursive=False)
|
||||||
|
observer.start()
|
||||||
|
|
||||||
|
print("👀 Watching for changes in content/ directory...")
|
||||||
|
print(" Press Ctrl+C to stop\n")
|
||||||
|
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
time.sleep(1)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("\n\n👋 Stopping watch script...")
|
||||||
|
observer.stop()
|
||||||
|
|
||||||
|
observer.join()
|
||||||
|
print("✅ Watch script stopped")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
19
site/images/icons/external.svg
Normal file
19
site/images/icons/external.svg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 95 95" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||||||
|
<g transform="matrix(1,0,0,1,-202,-302)">
|
||||||
|
<g transform="matrix(1,0,0,1.33483,-100.76,-132.962)">
|
||||||
|
<g id="external">
|
||||||
|
<g transform="matrix(0.379294,0.284151,-0.49503,0.370855,441.997,206.474)">
|
||||||
|
<path d="M153.268,210.759L198.269,249.283L108.267,249.283L153.268,210.759Z" style="stroke:black;stroke-width:3.21px;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(0.815276,0,0,0.610769,164.676,135.973)">
|
||||||
|
<path d="M274.284,323.076L212.698,385.381" style="fill:none;stroke:black;stroke-width:14.72px;"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(0.909309,0,0,0.68964,122.98,117.085)">
|
||||||
|
<path d="M293.162,359.953L293.162,376.767C293.162,389.004 283.227,398.939 270.99,398.939L226.647,398.939C214.41,398.939 204.475,389.004 204.475,376.767L204.475,332.423C204.475,320.186 214.41,310.252 226.647,310.252L246.213,310.252" style="fill:none;stroke:black;stroke-width:13.12px;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -8,26 +8,76 @@
|
|||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Special+Elite&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Special+Elite&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
<script>
|
||||||
|
// Randomize background color on page load
|
||||||
|
const colors = [
|
||||||
|
'#f5d9e3', // muted rose
|
||||||
|
'#f5e3d9', // muted peach
|
||||||
|
'#e3d9f5', // muted lavender
|
||||||
|
'#f5f5d9', // muted yellow
|
||||||
|
'#d9f5e3', // muted teal
|
||||||
|
'#f5d9d9', // muted coral
|
||||||
|
'#d9e3f5', // muted blue
|
||||||
|
'#f5dfe3' // muted peach-pink
|
||||||
|
];
|
||||||
|
const randomColor = colors[Math.floor(Math.random() * colors.length)];
|
||||||
|
document.documentElement.style.setProperty('--bg-color', randomColor);
|
||||||
|
|
||||||
|
// Randomize byline on page load
|
||||||
|
const bylines = [
|
||||||
|
'vamos a la casa',
|
||||||
|
'population: 3 (7 if you count the dogs, 8 with the cat)',
|
||||||
|
'don\'t look now it\'s right behind you',
|
||||||
|
'time will forget (it\'s mutual)',
|
||||||
|
'blink and you\'ll miss it (please don\'t)',
|
||||||
|
'*whispers* everyone knows your business',
|
||||||
|
'too abstract for maps',
|
||||||
|
'who needs productivity when you can nap',
|
||||||
|
'arros con gris y puerco lechon por favor',
|
||||||
|
'established since eventually, perhaps',
|
||||||
|
'this little piggie went weeeeeeeeeeeeeee',
|
||||||
|
'I know you are but what am I (you are wonderful)',
|
||||||
|
'androgynously being',
|
||||||
|
'don\t do anything I wouldn\'t do',
|
||||||
|
'wow you fit the whole thing in',
|
||||||
|
'ask me about my very big hat',
|
||||||
|
'what do you call a phone with a moustache',
|
||||||
|
'I would bet on the 100 chihuahuas versus that t-rex',
|
||||||
|
'sure you\'re a dog but what breed',
|
||||||
|
'it\s dark in here',
|
||||||
|
'are you gonna eat that',
|
||||||
|
'my aunt did the same thing once',
|
||||||
|
'did you hear the one about the silent vocalist',
|
||||||
|
'what the puppy',
|
||||||
|
'how now brown cow',
|
||||||
|
'merp merp merp'
|
||||||
|
];
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const randomByline = bylines[Math.floor(Math.random() * bylines.length)];
|
||||||
|
document.querySelector('.byline').textContent = randomByline;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="background-color: var(--bg-color);">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<h1>hola</h1>
|
<h1>Puercito Fiction</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<a href="#about">about</a>
|
<a href="about.html">about</a>
|
||||||
<a href="#comics">comics</a>
|
<a href="comics.html">comics</a>
|
||||||
<a href="#projects">projects</a>
|
<a href="projects.html">projects</a>
|
||||||
<a href="#newsletter">newsletter</a>
|
<a href="https://pencilbooth.com/puercito" target="_blank" rel="noopener noreferrer">newsletter<img src="images/icons/external.svg" alt="" class="external-icon"></a>
|
||||||
<a href="#links">links</a>
|
<a href="links.html">links</a>
|
||||||
<a href="#contact">contact</a>
|
<a href="contact.html">contact</a>
|
||||||
<a href="#now">now</a>
|
<a href="now.html">now</a>
|
||||||
<a href="#uses">uses</a>
|
<a href="uses.html">uses</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<p class="byline">stories from the little town</p>
|
<p class="byline">where comic strips come to gag</p>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
|||||||
@@ -8,31 +8,7 @@ body {
|
|||||||
font-family: 'Special Elite', monospace;
|
font-family: 'Special Elite', monospace;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: #191919;
|
color: #191919;
|
||||||
background-color: #e8e4d8;
|
background-color: #f5d9e3;
|
||||||
background-image:
|
|
||||||
/* Halftone dot pattern for newsprint effect */
|
|
||||||
radial-gradient(circle at 25% 25%, rgba(0,0,0,0.03) 1px, transparent 1px),
|
|
||||||
radial-gradient(circle at 75% 75%, rgba(0,0,0,0.03) 1px, transparent 1px),
|
|
||||||
/* Subtle noise texture */
|
|
||||||
url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E"),
|
|
||||||
/* Subtle weathered stains */
|
|
||||||
radial-gradient(ellipse at 20% 30%, rgba(139,119,101,0.08) 0%, transparent 50%),
|
|
||||||
radial-gradient(ellipse at 80% 70%, rgba(139,119,101,0.06) 0%, transparent 50%),
|
|
||||||
radial-gradient(ellipse at 50% 90%, rgba(139,119,101,0.05) 0%, transparent 40%);
|
|
||||||
background-size:
|
|
||||||
4px 4px,
|
|
||||||
4px 4px,
|
|
||||||
400px 400px,
|
|
||||||
60% 60%,
|
|
||||||
50% 50%,
|
|
||||||
70% 70%;
|
|
||||||
background-position:
|
|
||||||
0 0,
|
|
||||||
2px 2px,
|
|
||||||
0 0,
|
|
||||||
20% 30%,
|
|
||||||
80% 70%,
|
|
||||||
50% 90%;
|
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -106,6 +82,19 @@ nav a:hover::after {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.external-icon {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
margin-left: 0.25rem;
|
||||||
|
vertical-align: middle;
|
||||||
|
opacity: 0.6;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav a:hover .external-icon {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user