mirror of
http://101.35.51.105:3000/congyu/work_with_codex.git
synced 2026-04-28 06:40:51 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 54e5186a21 | |||
| f2424c043b |
+1
-11
@@ -9,16 +9,6 @@ import Hakyll
|
|||||||
import System.FilePath
|
import System.FilePath
|
||||||
import Text.Pandoc
|
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 :: Configuration
|
||||||
config =
|
config =
|
||||||
defaultConfiguration
|
defaultConfiguration
|
||||||
@@ -52,7 +42,7 @@ main = hakyllWith config $ do
|
|||||||
compile compressCssCompiler
|
compile compressCssCompiler
|
||||||
|
|
||||||
match "notes/*" $ do
|
match "notes/*" $ do
|
||||||
route cleanRoute
|
route $ setExtension "html"
|
||||||
compile $ do
|
compile $ do
|
||||||
tocCtx <- getTocCtx defaultContext
|
tocCtx <- getTocCtx defaultContext
|
||||||
chaoDocCompiler
|
chaoDocCompiler
|
||||||
|
|||||||
+16
-2
@@ -1,7 +1,16 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<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>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -13,11 +22,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-space">
|
<div class="text-space">
|
||||||
$partial("templates/navbar.html")$
|
<header class="no-print">
|
||||||
|
<nav>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
<main role="main">
|
<main role="main">
|
||||||
<h1 class="pagetitle">$title$</h1>
|
<h1 class="pagetitle">$title$</h1>
|
||||||
$body$
|
$body$
|
||||||
</main>
|
</main>
|
||||||
|
<footer></footer>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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" />
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<header class="no-print">
|
|
||||||
<nav>
|
|
||||||
<a href="/">Home</a>
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
Reference in New Issue
Block a user