Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
isovector committed Feb 6, 2022
0 parents commit 7483e8c
Show file tree
Hide file tree
Showing 14 changed files with 1,502 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.stack-work/
*~
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog for cofree-coffee-cast

## Unreleased changes
30 changes: 30 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Copyright Sandy Maguire (c) 2022

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of Sandy Maguire nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# cofree-coffee-cast
2 changes: 2 additions & 0 deletions Setup.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain
22 changes: 22 additions & 0 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{-# language OverloadedStrings #-}

module Main where

import SitePipe

main :: IO ()
main = site $ do
-- Load all the posts from site/posts/
posts <- resourceLoader markdownReader ["episodes/*.md"]

-- Build up a context for our index page
let indexContext :: Value
indexContext = object [ "posts" .= posts
-- The url is where the index page will be written to
, "url" .= ("/index.html" :: String)
]

-- write out index page and posts via templates
writeTemplate "templates/index.html" [indexContext]
writeTemplate "templates/episode.html" posts

54 changes: 54 additions & 0 deletions cofree-coffee-cast.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.34.4.
--
-- see: https://github.com/sol/hpack

name: cofree-coffee-cast
version: 0.1.0.0
description: Please see the README on GitHub at <https://github.com/isovector/cofree-coffee-cast#readme>
homepage: https://github.com/isovector/cofree-coffee-cast#readme
bug-reports: https://github.com/isovector/cofree-coffee-cast/issues
author: Sandy Maguire
maintainer: [email protected]
copyright: Sandy Maguire
license: BSD3
license-file: LICENSE
build-type: Simple
extra-source-files:
README.md
ChangeLog.md

source-repository head
type: git
location: https://github.com/isovector/cofree-coffee-cast

executable cofree-coffee-cast
main-is: Main.hs
other-modules:
Paths_cofree_coffee_cast
hs-source-dirs:
app
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
aeson
, base >=4.7 && <5
, pandoc
, sitepipe
default-language: Haskell2010

test-suite cofree-coffee-cast-test
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Paths_cofree_coffee_cast
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
aeson
, base >=4.7 && <5
, cofree-coffee-cast
, pandoc
, sitepipe
default-language: Haskell2010
46 changes: 46 additions & 0 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: cofree-coffee-cast
version: 0.1.0.0
github: "isovector/cofree-coffee-cast"
license: BSD3
author: "Sandy Maguire"
maintainer: "[email protected]"
copyright: "Sandy Maguire"

extra-source-files:
- README.md
- ChangeLog.md

# Metadata used when publishing your package
# synopsis: Short description of your package
# category: Web

# To avoid duplicated efforts in documentation and dealing with the
# complications of embedding Haddock markup inside cabal files, it is
# common to point users to the README.md file.
description: Please see the README on GitHub at <https://github.com/isovector/cofree-coffee-cast#readme>

dependencies:
- base >= 4.7 && < 5
- sitepipe
- aeson
- pandoc

executables:
cofree-coffee-cast:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N

tests:
cofree-coffee-cast-test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- cofree-coffee-cast
Loading

0 comments on commit 7483e8c

Please sign in to comment.