mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
WIP: port static markdown files in public root
This commit is contained in:
parent
cc1c97b4a1
commit
64d24fa8eb
5 changed files with 61 additions and 5 deletions
26
Readme.md
26
Readme.md
|
|
@ -23,18 +23,32 @@ Execution, trying TDD for the first time:
|
|||
|
||||
- [x] Add support for site styles
|
||||
|
||||
- [ ] Add support for page styles
|
||||
- [x] Add support for page styles
|
||||
|
||||
- [x] Add support for site scripts
|
||||
|
||||
- [ ] Add support for page scripts
|
||||
- [x] Add support for page scripts
|
||||
|
||||
- [x] Add support for CSS files
|
||||
|
||||
- [x] Transform LESS into CSS
|
||||
|
||||
- [ ] Migrate static pages to the new site generator
|
||||
|
||||
- [ ] About
|
||||
|
||||
- [ ] 404 / missing
|
||||
|
||||
- [ ] cv
|
||||
|
||||
- [ ] check and delete _data.json
|
||||
|
||||
- [ ] Migrate projects to the new site generator
|
||||
|
||||
- [ ] Migrate projects page
|
||||
|
||||
- [ ] Migrate project page
|
||||
|
||||
- [ ] Migrate posts to markdown with headers somehow
|
||||
|
||||
- [ ] Define the new format, probably with a folder for each year of posts since I don't write very much
|
||||
|
|
@ -43,6 +57,14 @@ Execution, trying TDD for the first time:
|
|||
|
||||
- [ ] Migrate posts
|
||||
|
||||
- [ ] Migrate year indexes
|
||||
|
||||
- [ ] Migrate month indexes
|
||||
|
||||
- [ ] Migrate index / recent posts
|
||||
|
||||
- [ ] Migrate archive
|
||||
|
||||
- [ ] Add a link to the code for samhuri.net somewhere ... so meta (about page?)
|
||||
|
||||
- [ ] Generate RSS feed (ditch mustache templates)
|
||||
|
|
|
|||
30
SiteGenerator/Sources/SiteGenerator/Model/Post.swift
Normal file
30
SiteGenerator/Sources/SiteGenerator/Model/Post.swift
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// Post.swift
|
||||
// SiteGenerator
|
||||
//
|
||||
// Created by Sami Samhuri on 2019-12-01.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct Post {
|
||||
let date: Date
|
||||
let formattedDate: String
|
||||
let title: String
|
||||
let slug: String
|
||||
let author: String
|
||||
let tags: [String]
|
||||
let body: String
|
||||
|
||||
var path: String {
|
||||
let dateComponents = Calendar.current.dateComponents([.year], from: date)
|
||||
let year = dateComponents.year!
|
||||
let month = dateComponents.month!
|
||||
return "/" + [
|
||||
"posts",
|
||||
"\(year)",
|
||||
"\(month)",
|
||||
"\(slug)",
|
||||
].joined(separator: "/")
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>{{ site.title }}</title>
|
||||
{% for style in allStyles %}
|
||||
{% for style in styles %}
|
||||
<link rel="stylesheet" href="{{ style }}">
|
||||
{% endfor %}
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
Title: About me
|
||||
---
|
||||
|
||||
I'm Sami Samhuri, a software developer and general technology geek. Sometimes
|
||||
I write my thoughts and post my projects here. I moved to [Victoria, BC][vic]
|
||||
in 2003 to study computer science at the [University of Victoria][uvic], and
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<meta name="msapplication-config" content="/images/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
{% for style in allStyles %}
|
||||
{% for style in styles %}
|
||||
<link rel="stylesheet" href="{{ style }}">
|
||||
{% endfor %}
|
||||
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
})();
|
||||
</script>
|
||||
|
||||
{% for script in allScripts %}
|
||||
{% for script in scripts %}
|
||||
<script defer src="{{ script }}"></script>
|
||||
{% endfor %}
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Reference in a new issue