From 55084d910ccde68dcd36fde4491bf19ea37c8114 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 4 Oct 2020 13:50:13 -0400 Subject: [PATCH 1/6] Mark v1.0 --- CHANGELOG.md | 2 +- rib-core/rib-core.cabal | 2 +- rib/rib.cabal | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0eda00..7a9070d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log for rib -## Unreleased +## 1.0 - Split packages into `rib` and `rib-core` diff --git a/rib-core/rib-core.cabal b/rib-core/rib-core.cabal index e44de5b..24fbfb1 100644 --- a/rib-core/rib-core.cabal +++ b/rib-core/rib-core.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: rib-core -version: 0.13.0.0 +version: 1.0.0.0 license: BSD-3-Clause copyright: 2019 Sridhar Ratnakumar maintainer: srid@srid.ca diff --git a/rib/rib.cabal b/rib/rib.cabal index 747cddc..c64b6a9 100644 --- a/rib/rib.cabal +++ b/rib/rib.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: rib -version: 0.13.0.0 +version: 1.0.0.0 license: BSD-3-Clause copyright: 2019 Sridhar Ratnakumar maintainer: srid@srid.ca From 89daf753ab3760a45f82c4c49b95d41c49e8ff1c Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 4 Oct 2020 13:50:38 -0400 Subject: [PATCH 2/6] Fix warning --- rib-core/src/Rib/Cli.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rib-core/src/Rib/Cli.hs b/rib-core/src/Rib/Cli.hs index 305b7ae..ccd5c15 100644 --- a/rib-core/src/Rib/Cli.hs +++ b/rib-core/src/Rib/Cli.hs @@ -74,7 +74,7 @@ cliParser inputDirDefault outputDirDefault = do ) ) ~(inputDir, shakeDbDir) <- - fmap (mapToSnd shakeDbDirFrom) $ + fmap (toSnd shakeDbDirFrom) $ option directoryReader ( long "input-dir" From 1066e2064beb68b4b3adc9711275546176ad4907 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 4 Oct 2020 13:50:43 -0400 Subject: [PATCH 3/6] Fix bin/test --- cabal.project | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 cabal.project diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..9a791c8 --- /dev/null +++ b/cabal.project @@ -0,0 +1,2 @@ +optional-packages: + * From 8f272c374191475bb20a2732fcfb9907c7d8c63c Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 4 Oct 2020 13:55:37 -0400 Subject: [PATCH 4/6] guide: use slug-based URLs --- guide/2015602.md | 8 ------- guide/{2014302.md => examples.md} | 0 guide/guide.md | 6 ++++++ guide/index.md | 8 +++---- guide/neuron.dhall | 22 +++++++++++--------- guide/{2015601.md => preview.md} | 0 guide/{2015603.md => syntax-highlighting.md} | 0 guide/{2014301.md => tutorial.md} | 2 +- guide/{2015604.md => typed-routes.md} | 4 ++-- 9 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 guide/2015602.md rename guide/{2014302.md => examples.md} (100%) create mode 100644 guide/guide.md rename guide/{2015601.md => preview.md} (100%) rename guide/{2015603.md => syntax-highlighting.md} (100%) rename guide/{2014301.md => tutorial.md} (99%) rename guide/{2015604.md => typed-routes.md} (96%) diff --git a/guide/2015602.md b/guide/2015602.md deleted file mode 100644 index 324a69f..0000000 --- a/guide/2015602.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Guide ---- - -Assuming you have read the [[2014301]], use this portal to -understand how to do certain things in Rib. - -[[[z:zettels?tag=guide]]] diff --git a/guide/2014302.md b/guide/examples.md similarity index 100% rename from guide/2014302.md rename to guide/examples.md diff --git a/guide/guide.md b/guide/guide.md new file mode 100644 index 0000000..41cb20e --- /dev/null +++ b/guide/guide.md @@ -0,0 +1,6 @@ +# Guide + +Assuming you have read the [[tutorial]], use this portal to +understand how to do certain things in Rib. + +[[[z:zettels?tag=guide]]] diff --git a/guide/index.md b/guide/index.md index 1da1476..f6e549a 100644 --- a/guide/index.md +++ b/guide/index.md @@ -19,7 +19,7 @@ reinventing their capabilities. Time spent using rib is time spent learning them - Remain as simple as possible to use - Reproducible and a delightful workflow enabled by Nix, ghcid and fsnotify. -See [[[2015601]]] to get a feel for what your code may look like. +See [[[preview]]] to get a feel for what your code may look like. ## Getting Started @@ -30,7 +30,7 @@ repository, [**rib-sample**](https://github.com/srid/rib-sample), from Github. ## Next -* [[[2014301]]] -* [[[2015602]]] -* [[[2014302]]] +* [[[tutorial]]] +* [[[guide]]] +* [[[examples]]] diff --git a/guide/neuron.dhall b/guide/neuron.dhall index 2a4ffb0..9ebf0a4 100644 --- a/guide/neuron.dhall +++ b/guide/neuron.dhall @@ -1,11 +1,13 @@ -{ siteTitle = - "Rib" -, siteBaseUrl = - Some "https://rib.srid.ca" -, theme = - "green" -, editUrl = - Some "https://github.com/srid/rib/edit/master/guide/" -, minVersion = - "0.2" +{ siteTitle = "Rib" +, siteBaseUrl = Some "https://rib.srid.ca" +, theme = "green" +, editUrl = Some "https://github.com/srid/rib/edit/master/guide/" +, aliases = + [ "2014302:examples" + , "2015602:guide" + , "2014301:tutorial" + , "2015604:typed-routes" + , "2015603:syntax-highlighting" + , "2015601:preview" + ] } diff --git a/guide/2015601.md b/guide/preview.md similarity index 100% rename from guide/2015601.md rename to guide/preview.md diff --git a/guide/2015603.md b/guide/syntax-highlighting.md similarity index 100% rename from guide/2015603.md rename to guide/syntax-highlighting.md diff --git a/guide/2014301.md b/guide/tutorial.md similarity index 99% rename from guide/2014301.md rename to guide/tutorial.md index 1be74ea..74c360f 100644 --- a/guide/2014301.md +++ b/guide/tutorial.md @@ -19,7 +19,7 @@ content/ default.nix Main.hs README.md rib-sample.cabal The three key items here are: 1. `Main.hs`: Haskell source containing the DSL of the HTML/CSS of your site. - See [[2015601]]. + See [[preview]]. 2. `content/`: The source content (eg: Markdown sources and static files) 3. `dest/`: The target directory, excluded from the git repository, will contain _generated_ content (i.e., the HTML files, and copied over static content) diff --git a/guide/2015604.md b/guide/typed-routes.md similarity index 96% rename from guide/2015604.md rename to guide/typed-routes.md index a6c0449..2529747 100644 --- a/guide/2015604.md +++ b/guide/typed-routes.md @@ -7,8 +7,8 @@ tags: Rib includes an optional route system based on [GADT](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/gadt.html)s than can be used to define safe and structured routes for your site. The sample repo -used in [[2014301]] already uses routes, and you can see the entire code in -[[2015601]] to see all of this would fit together in a static site +used in [[tutorial]] already uses routes, and you can see the entire code in +[[preview]] to see all of this would fit together in a static site generator. From 1855fb54b7b87f1156b5a744ba9118e97d52d112 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 4 Oct 2020 13:59:50 -0400 Subject: [PATCH 5/6] guide: use H1 title --- guide/examples.md | 4 +--- guide/index.md | 4 +--- guide/preview.md | 4 +--- guide/syntax-highlighting.md | 3 ++- guide/tutorial.md | 4 +--- guide/typed-routes.md | 3 ++- 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/guide/examples.md b/guide/examples.md index c366426..430de69 100644 --- a/guide/examples.md +++ b/guide/examples.md @@ -1,6 +1,4 @@ ---- -title: Examples ---- +# Examples * [rib-sample](https://github.com/srid/rib-sample): Use this to get started with your own site. diff --git a/guide/index.md b/guide/index.md index f6e549a..7de0b57 100644 --- a/guide/index.md +++ b/guide/index.md @@ -1,6 +1,4 @@ ---- -title: Rib ---- +# Rib [Rib](https://github.com/srid/rib) is a Haskell **static site generator** based on Shake, with a delightful development experience. diff --git a/guide/preview.md b/guide/preview.md index d196439..9e19673 100644 --- a/guide/preview.md +++ b/guide/preview.md @@ -1,6 +1,4 @@ ---- -title: Quick Preview ---- +# Quick Preview Here is how your code may look like if you were to generate your static site using Rib: diff --git a/guide/syntax-highlighting.md b/guide/syntax-highlighting.md index c6fe276..929e2ff 100644 --- a/guide/syntax-highlighting.md +++ b/guide/syntax-highlighting.md @@ -1,9 +1,10 @@ --- -title: Enable Syntax Highlighting tags: - guide --- +# Enable Syntax Highlighting + Use Pandoc to add syntax highlighting support to your rib site. 1. Import the desired style from Pandoc diff --git a/guide/tutorial.md b/guide/tutorial.md index 74c360f..90753d9 100644 --- a/guide/tutorial.md +++ b/guide/tutorial.md @@ -1,6 +1,4 @@ ---- -title: Tutorial ---- +# Tutorial Although Rib is at its core a Haskell library (and meant to be used as one, rather than as a framework), it provides toolset (based on nix, ghcid, fsnotify, etc.) to make working with static sites pleasant. diff --git a/guide/typed-routes.md b/guide/typed-routes.md index 2529747..bda3f0a 100644 --- a/guide/typed-routes.md +++ b/guide/typed-routes.md @@ -1,9 +1,10 @@ --- -title: Typed Routes tags: - guide --- +# Typed Routes + Rib includes an optional route system based on [GADT](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/gadt.html)s than can be used to define safe and structured routes for your site. The sample repo From caebad9cff65069528f6fed9b501a894dac87cc2 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 4 Oct 2020 14:07:44 -0400 Subject: [PATCH 6/6] Fix ghcid command in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a48c66..23b67b4 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ See for full documentation. Use ghcid for quicker compilation cycles: ```bash -nix-shell --run ghcid +nix-shell --run "cd rib-core && ghcid" ``` To test your changes, clone [rib-sample](https://github.com/srid/rib-sample) and run it using your local rib checkout: