From 52b82fe03f3e5291cedcb8f02ff247029ce97176 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Fri, 30 Jan 2026 16:19:41 +0100 Subject: [PATCH] init commit --- .envrc | 1 + .gitignore | 3 + config.toml | 15 ++++ content/_index.md | 7 ++ content/blog/_index.md | 7 ++ content/blog/hello-zola.md | 27 ++++++ flake.nix | 26 ++++++ sass/style.scss | 170 +++++++++++++++++++++++++++++++++++++ templates/404.html | 11 +++ templates/base.html | 35 ++++++++ templates/index.html | 20 +++++ templates/page.html | 17 ++++ templates/section.html | 33 +++++++ 13 files changed, 372 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 config.toml create mode 100644 content/_index.md create mode 100644 content/blog/_index.md create mode 100644 content/blog/hello-zola.md create mode 100644 flake.nix create mode 100644 sass/style.scss create mode 100644 templates/404.html create mode 100644 templates/base.html create mode 100644 templates/index.html create mode 100644 templates/page.html create mode 100644 templates/section.html diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..09025e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +public/ +.direnv/ +.DS_Store diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..d13da11 --- /dev/null +++ b/config.toml @@ -0,0 +1,15 @@ +base_url = "https://blog.yanlincs.com" +title = "Yan Lin's Blog" +description = "Personal blog of Yan Lin, Postdoctoral Researcher at Aalborg University" +default_language = "en" +compile_sass = true +minify_html = false +generate_feeds = true +feed_filenames = ["rss.xml"] + +[markdown] +highlight_code = true +highlight_theme = "css" + +[extra] +author = "Yan Lin" diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..3bc67b6 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,7 @@ ++++ +title = "Welcome" ++++ + +My name is Yan Lin, and this is my personal blog where I occasionally post my thoughts and findings during research. + +I am a postdoctoral researcher in the Department of Computer Science at Aalborg University. My research interests include spatiotemporal data mining, representation learning, and AI for science. diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..fd8a442 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,7 @@ ++++ +title = "Blog" +sort_by = "date" +paginate_by = 10 ++++ + +Occasional thoughts and findings from research and beyond. diff --git a/content/blog/hello-zola.md b/content/blog/hello-zola.md new file mode 100644 index 0000000..9010814 --- /dev/null +++ b/content/blog/hello-zola.md @@ -0,0 +1,27 @@ ++++ +title = "Hello, Zola" +date = 2026-01-30 +draft = false ++++ + +This blog has migrated from Quartz to Zola. The previous version was feature-rich with backlinks, graph views, and Obsidian integration. This new version prioritizes simplicity. + +## Why the Change? + +Quartz is excellent for digital gardens and interconnected notes. However, for a straightforward blog, it carries unnecessary complexity. Zola offers: + +- **Fast builds**: Written in Rust, compilation is nearly instant +- **Simple structure**: Plain markdown files with TOML frontmatter +- **No JavaScript dependency**: Static HTML output +- **Nix-friendly**: Single binary, easy to include in flake + +## What to Expect + +The content focus remains the same: + +- Machine learning techniques +- AI systems and infrastructure +- Conference paper summaries +- Occasional homelab notes + +The design is intentionally minimal. No fancy features, just words on a page. diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b24be96 --- /dev/null +++ b/flake.nix @@ -0,0 +1,26 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = { self, nixpkgs }: let + systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system}); + in { + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell { + packages = with pkgs; [ + zola + (writeShellScriptBin "serve" '' + zola serve --open + '') + (writeShellScriptBin "build" '' + zola build + '') + ]; + shellHook = '' + echo "Zola blog development environment" + echo "Commands: serve, build, zola" + ''; + }; + }); + }; +} diff --git a/sass/style.scss b/sass/style.scss new file mode 100644 index 0000000..e90f892 --- /dev/null +++ b/sass/style.scss @@ -0,0 +1,170 @@ +:root { + --bg: #fff; + --fg: #222; + --accent: #284b63; + --muted: #666; + --border: #e5e5e5; + --code-bg: #f5f5f5; + --max-width: 42rem; +} + +@media (prefers-color-scheme: dark) { + :root { + --bg: #161618; + --fg: #ebebec; + --accent: #7b97aa; + --muted: #999; + --border: #333; + --code-bg: #1e1e1e; + } +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +html { + font-size: 18px; + line-height: 1.6; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + background: var(--bg); + color: var(--fg); + max-width: var(--max-width); + margin: 0 auto; + padding: 2rem 1rem; +} + +a { + color: var(--accent); + text-decoration: none; + + &:hover { + text-decoration: underline; + } +} + +header nav { + display: flex; + gap: 1.5rem; + margin-bottom: 3rem; + padding-bottom: 1rem; + border-bottom: 1px solid var(--border); + + .site-title { + font-weight: 600; + } +} + +main { + min-height: 60vh; +} + +h1, h2, h3 { + margin: 1.5rem 0 0.75rem; + line-height: 1.3; +} + +h1 { font-size: 1.75rem; } +h2 { font-size: 1.4rem; } +h3 { font-size: 1.15rem; } + +p, ul, ol { + margin-bottom: 1rem; +} + +ul, ol { + padding-left: 1.5rem; +} + +.post-header { + margin-bottom: 2rem; + + h1 { + margin-bottom: 0.5rem; + } + + time { + color: var(--muted); + font-size: 0.9rem; + } +} + +.post-list { + list-style: none; + padding: 0; + + li { + display: flex; + gap: 1rem; + margin-bottom: 0.5rem; + + time { + color: var(--muted); + font-size: 0.9rem; + min-width: 6rem; + } + } +} + +.recent-posts { + margin-top: 3rem; +} + +code { + font-family: "Fira Code", "SF Mono", Consolas, monospace; + font-size: 0.9em; + background: var(--code-bg); + padding: 0.1em 0.3em; + border-radius: 3px; +} + +pre { + background: var(--code-bg); + padding: 1rem; + overflow-x: auto; + border-radius: 4px; + margin-bottom: 1rem; + + code { + background: none; + padding: 0; + } +} + +blockquote { + border-left: 3px solid var(--accent); + padding-left: 1rem; + margin: 1rem 0; + color: var(--muted); +} + +.pagination { + display: flex; + justify-content: space-between; + margin-top: 2rem; + padding-top: 1rem; + border-top: 1px solid var(--border); +} + +.not-found { + text-align: center; + padding: 3rem 0; + + h1 { + font-size: 4rem; + margin-bottom: 1rem; + } +} + +footer { + margin-top: 3rem; + padding-top: 1rem; + border-top: 1px solid var(--border); + color: var(--muted); + font-size: 0.9rem; +} diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..7d25bd4 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block title %}Not Found - {{ config.title }}{% endblock title %} + +{% block content %} +
+

404

+

Page not found.

+

Return home

+
+{% endblock content %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..3ba9eb5 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,35 @@ + + + + + + {% block title %}{{ config.title }}{% endblock title %} + + + + + + + + + +
+ +
+
+ {% block content %}{% endblock content %} +
+ + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..4cc8a39 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{% block content %} +
+ {{ section.content | safe }} +
+ +
+

Recent Posts

+ {% set blog = get_section(path="blog/_index.md") %} + +
+{% endblock content %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..755cb34 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %}{{ page.title }} - {{ config.title }}{% endblock title %} + +{% block content %} +
+
+

{{ page.title }}

+ {% if page.date %} + + {% endif %} +
+
+ {{ page.content | safe }} +
+
+{% endblock content %} diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..8ad7fe1 --- /dev/null +++ b/templates/section.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} + +{% block title %}{{ section.title }} - {{ config.title }}{% endblock title %} + +{% block content %} +

{{ section.title }}

+ +{% if section.content %} +
+ {{ section.content | safe }} +
+{% endif %} + + + +{% if paginator %} + +{% endif %} +{% endblock content %}