Browse Source

Initial work blowing the dust off this codebase

This primarily includes updating dependencies, and using stack for sane dependency management.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
pull/8/head
Collin J. Doering 3 years ago
committed by Collin J. Doering
parent
commit
c0498bff65
Signed by: rekahsoft GPG Key ID: 7B4DEB93212B3022
5 changed files with 92 additions and 29 deletions
  1. +18
    -18
      blog-rekahsoft-ca.cabal
  2. +2
    -2
      clay/Header.hs
  3. +1
    -1
      clay/Util.hs
  4. +6
    -8
      src/site.hs
  5. +65
    -0
      stack.yaml

+ 18
- 18
blog-rekahsoft-ca.cabal View File

@ -61,8 +61,8 @@ executable blog-rekahsoft-ca
other-extensions: OverloadedStrings, TupleSections, FlexibleContexts
-- Other library packages from which modules are imported.
build-depends: base >=4.10 && <4.11,
hakyll >= 4.9 && <4.10,
build-depends: base >=4.11 && <4.12,
hakyll >= 4.12 && <4.13,
pandoc >= 1.13,
parsec >= 3.1,
filepath >= 1.3,
@ -89,8 +89,8 @@ executable gencss
other-extensions: OverloadedStrings
-- Other library packages from which modules are imported.
build-depends: base >=4.10 && <4.11,
clay >=0.12 && <0.13,
build-depends: base >=4.11 && <4.12,
clay >=0.13 && <0.14,
text >=1.2 && <1.3
-- Directories containing source files.
@ -99,17 +99,17 @@ executable gencss
-- Base language which the package is written in.
default-language: Haskell2010
Test-Suite test-site
type: exitcode-stdio-1.0
main-is: Main.hs
Ghc-options: -Wall -O2 -threaded
hs-source-dirs: src, test
build-depends: base >=4.10 && <4.11,
hspec >= 2.1,
hspec-webdriver >= 1.0,
webdriver >= 0.6,
process >= 1.2,
directory >= 1.2,
text >= 1.2 && <1.3,
filepath >= 1.3
default-language: Haskell2010
-- Test-Suite test-site
-- type: exitcode-stdio-1.0
-- main-is: Main.hs
-- Ghc-options: -Wall -O2 -threaded
-- hs-source-dirs: src, test
-- build-depends: base >=4.11 && <4.12,
-- hspec >= 2.1,
-- hspec-webdriver >= 1.2 && <1.3,
-- webdriver >= 0.6,
-- process >= 1.2,
-- directory >= 1.2,
-- text >= 1.2 && <1.3,
-- filepath >= 1.3
-- default-language: Haskell2010

+ 2
- 2
clay/Header.hs View File

@ -131,8 +131,8 @@ statusMessage = do
borderBottomRightRadius (px 5) (px 5)
borderBottomLeftRadius (px 5) (px 5)
backgroundColor $ rgb 146 208 240
-- boxShadow (px 2) (px 5) (px 5) (px 2) "#888888"
boxShadow (px 2) (px 5) (px 5) "#888888"
-- boxShadow (px 2) (px 5) (px 5) "#888888"
--boxShadow [shadowWithSpread (px 2) (px 5) (px 5), bsColor "#888888" $ shadow (px 1) (px 2)]
sym padding (px 8)
marginBottom (em 1.25)


+ 1
- 1
clay/Util.hs View File

@ -34,6 +34,6 @@ makeBorderBox pad backCol =
backgroundColor backCol'
border solid (px 1) "#888"
borderRadius (px 5) (px 5) (px 5) (px 5)
boxShadow (px 2) (px 5) (px 2) "#888"
-- boxShadow (px 2) (px 5) (px 2) "#888"
sym padding pad'
marginBottom (em 1.25)

+ 6
- 8
src/site.hs View File

@ -26,24 +26,23 @@ import Hakyll
import Control.Monad
import Data.Monoid (mconcat,(<>))
import Data.List (sortBy)
import Data.Map (toList, size)
import qualified Data.Set as S
import Data.Map (toList)
import Data.Ord (comparing)
import System.Random
import System.FilePath (takeBaseName, (</>))
import System.FilePath (takeBaseName)
import System.Process
import System.Exit
import System.IO (hGetContents)
import Text.Parsec
import Text.Pandoc.Options
import Control.Applicative hiding ((<|>),many)
import Control.Applicative()
---------------------------------------------------------------------------------------------------------
pandocReaderOptions :: ReaderOptions
pandocReaderOptions = defaultHakyllReaderOptions
{ readerExtensions = S.fromList
pandocReaderOptions = def
{ readerExtensions = extensionsFromList
[ Ext_footnotes
, Ext_inline_notes
, Ext_pandoc_title_block
@ -84,8 +83,7 @@ pandocReaderOptions = defaultHakyllReaderOptions
pandocWriterOptions :: WriterOptions
pandocWriterOptions = defaultHakyllWriterOptions
{ writerHtml5 = True
, writerHTMLMathMethod = MathJax ""
{ writerHTMLMathMethod = MathJax ""
, writerEmailObfuscation = NoObfuscation -- ReferenceObfuscation
}


+ 65
- 0
stack.yaml View File

@ -0,0 +1,65 @@
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# https://docs.haskellstack.org/en/stable/yaml_configuration/
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# resolver: lts-3.5
# resolver: nightly-2015-09-21
# resolver: ghc-7.10.2
# resolver: ghcjs-0.1.0_ghc-7.10.2
#
# The location of a snapshot can be provided as a file or url. Stack assumes
# a snapshot provided as a file might change, whereas a url resource does not.
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: lts-12.0
# User packages to be built.
# Various formats can be used as shown in the example below.
#
# packages:
# - some-directory
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
# - location:
# git: https://github.com/commercialhaskell/stack.git
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# subdirs:
# - auto-update
# - wai
packages:
- .
# Dependency packages to be pulled from upstream that are not in the resolver
# using the same syntax as the packages field.
# (e.g., acme-missiles-0.3)
# extra-deps: []
# Override default flag values for local packages and extra-deps
# flags: {}
# Extra package databases containing global packages
# extra-package-dbs: []
# Control whether we use the GHC we find on the path
# system-ghc: true
#
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: ">=1.7"
#
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
#
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor

Loading…
Cancel
Save