Compare commits

...

2 Commits

Author SHA1 Message Date
dfsek 5e15eba377 update about page 1 year ago
dfsek 8fdc3caa73 add titles 1 year ago
  1. 11
      pages/about.hamlet
  2. 14
      src/Application.hs
  3. 2
      src/DfsekConfig.hs

@ -14,11 +14,18 @@
<li>Kotlin (sometimes)
<li>Compilers
<li>Open-Source Stuff
<li>Anything Self-hosted
<li>Self-Hostable Stuff
<li>Linux
<h2>Things I Want to Learn/Try
<ul>
<li>Rust
<li>Clojure
<li>Julia
<li>LaTeX
<h2>Website
<p>
This website is still a work-in-progress, it's a long overdue from-scratch project to replace
the bloated nightmare that 15 year-old me made.
the bloated JS-filled nightmare that 15 year-old me made.

@ -152,19 +152,19 @@ instance YesodPersist Dfsek where
runSqlPool f pool
getHomeR :: Handler Html
getHomeR = defaultLayout $(whamletFile "pages/home.hamlet")
getHomeR = defaultLayout (setTitle "dfsek.com" >> $(whamletFile "pages/home.hamlet"))
getAboutR :: Handler Html
getAboutR = defaultLayout $(whamletFile "pages/about.hamlet")
getAboutR = defaultLayout (setTitle "dfsek.com - About" >> $(whamletFile "pages/about.hamlet"))
getProjectsR :: Handler Html
getProjectsR = defaultLayout $(whamletFile "pages/projects.hamlet")
getProjectsR = defaultLayout (setTitle "dfsek.com - My Project" >> $(whamletFile "pages/projects.hamlet"))
getBlogR :: Handler Html
getBlogR = defaultLayout $(whamletFile "pages/blog.hamlet")
getBlogR = defaultLayout (setTitle "dfsek.com - Blog" >> $(whamletFile "pages/blog.hamlet"))
getBlogTEMP_RIVERS :: Handler Html
getBlogTEMP_RIVERS = defaultLayout $(whamletFile "static_blog/noise_rivers.hamlet")
getBlogTEMP_RIVERS = defaultLayout (setTitle "dfsek.com - Blog - Procedural River Generation" >> $(whamletFile "static_blog/noise_rivers.hamlet"))
appMain :: IO ()
appMain = do
@ -172,12 +172,12 @@ appMain = do
case c' of
Left e -> error $ "Could not parse config file: " <> show e
Right conf -> do
pool <- runStdoutLoggingT $ createSqlitePool "images.db3" $ connection_count (database conf)
pool <- runStdoutLoggingT $ createSqlitePool (sqlite_file (database conf)) $ connection_count (database conf)
runSqlPersistMPool (runMigration migrateAll) pool
let contentDir = content_directory conf
createDirectoryIfMissing True contentDir
putStrLn $ "Images will be saved to " <> contentDir
putStrLn $ "Static directory: " <> contentDir
staticRoute <- static contentDir
staticWellKnown <- static contentDir

@ -26,7 +26,7 @@ data DfsekConfig = DfsekConfig
deriving (Generic, FromJSON)
data DatabaseConfig = DatabaseConfig
{ sqlite_file :: String,
{ sqlite_file :: Text,
connection_count :: Int
}
deriving (Generic, FromJSON)

Loading…
Cancel
Save