Compare commits

..

2 Commits

Author SHA1 Message Date
sxlxc 54e5186a21 remove fancy routes 2026-04-04 00:02:41 +08:00
sxlxc f2424c043b modify templates 2026-04-03 23:56:52 +08:00
4 changed files with 17 additions and 28 deletions
+1 -11
View File
@@ -9,16 +9,6 @@ import Hakyll
import System.FilePath
import Text.Pandoc
--------------------------------------------------------------------------------
-- https://www.rohanjain.in/hakyll-clean-urls/
cleanRoute :: Routes
cleanRoute = customRoute createIndexRoute
where
createIndexRoute ident = takeDirectory p </> takeBaseName p </> "index.html"
where
p = toFilePath ident
--------------------------------------------------------------------------------
config :: Configuration
config =
defaultConfiguration
@@ -52,7 +42,7 @@ main = hakyllWith config $ do
compile compressCssCompiler
match "notes/*" $ do
route cleanRoute
route $ setExtension "html"
compile $ do
tocCtx <- getTocCtx defaultContext
chaoDocCompiler
+16 -2
View File
@@ -1,7 +1,16 @@
<!doctype html>
<html lang="en">
<head>
$partial("templates/head.html")$
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="googlebot" content="noindex" />
<title>$title$</title>
<link rel="stylesheet" href="/css/fonts.css" />
<link rel="stylesheet" href="/css/default.css" />
<link rel="stylesheet" href="/css/pygentize.css" />
<link rel="stylesheet" href="/css/chao-theorems.css" />
<link rel="stylesheet" href="/css/sidenotes.css" />
</head>
<body>
@@ -13,11 +22,16 @@
</div>
</div>
<div class="text-space">
$partial("templates/navbar.html")$
<header class="no-print">
<nav>
<a href="/">Home</a>
</nav>
</header>
<main role="main">
<h1 class="pagetitle">$title$</h1>
$body$
</main>
<footer></footer>
</div>
</body>
</html>
-10
View File
@@ -1,10 +0,0 @@
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="googlebot" content="noindex" />
<title>$title$</title>
<link rel="stylesheet" href="/css/fonts.css" />
<link rel="stylesheet" href="/css/default.css" />
<link rel="stylesheet" href="/css/pygentize.css" />
<link rel="stylesheet" href="/css/chao-theorems.css" />
<link rel="stylesheet" href="/css/sidenotes.css" />
-5
View File
@@ -1,5 +0,0 @@
<header class="no-print">
<nav>
<a href="/">Home</a>
</nav>
</header>