From eead94fde4278ccf78728eec1d5a99c99d40c32b Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sun, 30 Aug 2020 14:12:34 +0200 Subject: Add xvw.github.io to examples --- web/examples.markdown | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web') diff --git a/web/examples.markdown b/web/examples.markdown index 3657ea0..770eecb 100644 --- a/web/examples.markdown +++ b/web/examples.markdown @@ -192,6 +192,8 @@ directly with the default Hakyll site. [source](https://github.com/rpearce/robertwpearce.com) - , [source](https://github.com/thjread/thjread-blog) +- , + [source](https://github.com/xvw/planet) ## Hakyll 3.X -- cgit v1.2.3 From 17b4c81c1457e00c17e0ca6c8b2dc9d6d596f349 Mon Sep 17 00:00:00 2001 From: Marko Dimjašević Date: Wed, 11 Nov 2020 22:12:19 +0100 Subject: Update a reference to Debian now that Hakyll is available in the Debian stable release (#798) --- web/tutorials/01-installation.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/tutorials/01-installation.markdown b/web/tutorials/01-installation.markdown index 16e73c8..c41d9a6 100644 --- a/web/tutorials/01-installation.markdown +++ b/web/tutorials/01-installation.markdown @@ -21,7 +21,7 @@ Hakyll. 3. There are also some Linux distro packages: - - [Debian unstable](http://packages.debian.org/source/sid/haskell-hakyll) + - [Debian](https://packages.debian.org/source/stable/haskell-hakyll) - [Fedora](https://apps.fedoraproject.org/packages/ghc-hakyll) - [Nix]: `$ nix-env -iA nixos.haskellPackages.hakyll` -- cgit v1.2.3 From 0c313aa6ef620d8da098bc200f62bbaf984736c2 Mon Sep 17 00:00:00 2001 From: Thomas Mahler Date: Mon, 23 Nov 2020 19:44:40 +0100 Subject: Issue #822: change tutorial to reflect recent GH Pages features (#823) --- web/tutorials/github-pages-tutorial.md | 126 +++++++++------------------------ 1 file changed, 34 insertions(+), 92 deletions(-) (limited to 'web') diff --git a/web/tutorials/github-pages-tutorial.md b/web/tutorials/github-pages-tutorial.md index f79605c..acecb38 100644 --- a/web/tutorials/github-pages-tutorial.md +++ b/web/tutorials/github-pages-tutorial.md @@ -10,10 +10,7 @@ type: article Working with Hakyll on a GitHub Pages-hosted website is complicated slightly due to Hakyll outputting files to a ```_site``` subdirectory, our desire to have the source code as well as the compiled site stored in a single repository, and our desire to automate it. -This guide will walkthrough the creation and setup of a GitHub site that has two independent branches. - -1. ```master``` - This is where your site lives. It's what you see when you go to ```https://.github.io```. This branch *needs* to be called master. -2. ```develop``` - This is where your website's source is. That's all your Haskell code, your posts and templates, etc, and it's where you do work from. This name was chosen arbitrarily and can be freely substituted for any name of your choosing. +This guide will walkthrough the creation and setup of a GitHub site that works on a single `master` branch. When you're finished, you will be able to, with one command, refresh your website's contents and send any changes to your GitHub Page. @@ -27,14 +24,15 @@ These instructions should be easy to adapt for any situation though. ## GitHub Setup -1. If required, create a new repository for your blog. -2. If required, create a ```master``` branch. -2. If applicable/desired, create/add to your repository any files that your site needs that will not be produced by your Hakyll project. For example, ```CNAME``` as outlined [here](https://help.github.com/articles/setting-up-your-pages-site-repository/). -3. Create a ```.gitignore``` file with at a minimum, the following entries: +1. If required, create a new GitHub repository for your blog. +2. If required, create a `master` branch. +3. in the Settings of your GitHub project define that the `/docs` folder from the `master` branch should be used as document-root of your site. + Please refer to the [documentation](https://docs.github.com/en/free-pro-team@latest/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source) + in case of problems. +4. Create a .gitignore file with at a minimum, the following entries: ``` _cache/ -_site/ .stack-work/ ``` @@ -47,10 +45,8 @@ _site/ 2. Create a ```.gitignore``` file in your blog's directory with at a minimum, the same directories listed as in the GitHub repository. 3. Use the following git commands to setup your local repository. -``` +```bash git init -# create new branch called develop and switch to it. -git checkout -b develop # track all the source files for our blog. git add . # make our first commit @@ -59,130 +55,76 @@ git commit -m "initial commit." git remote add origin ``` -## Deployment +### Modify site.hs -So everything's all setup and we're ready to deploy. +In order to make Hakyll generate the site into the `/docs` folder you'll have to edit the Hakyll Main module (`site.hs` if you use the stack template): -> **Note:** Performing the following commands from your ```develop``` branch is recommended since you will end up back in that branch at the end. +```haskell +config :: Configuration +config = defaultConfiguration + { destinationDirectory = "docs" + } -Temporarily save any uncommitted changes that may exist in the current branch. - -``` -git stash +main :: IO () +main = do + hakyllWith config $ do + ... ``` -Ensure we are in the correct branch. +## Deployment -``` -git checkout develop -``` +So everything’s all setup, and we’re ready to deploy. -We need to be able to run the executable that generates the website, so we need -to compile it first. If you are using `stack`, this can be done using: +We need to be able to run the executable that generates the website, so we need to compile it first. If you are using stack, this can be done using: -``` +```bash stack build ``` -Now get a clean build of our site. +Next we get a clean build of our site: -``` +```bash stack exec myblog clean stack exec myblog build ``` -Update the local list of remote branches to ensure we're able to checkout the branch we want in the next step. - -``` -git fetch --all -``` - -Switch to the `master` branch. - -> **Note:** Checking out this branch does not overwrite the files that Hakyll just produced because we have '_site' listed in both .gitignore files. - -``` -git checkout -b master --track origin/master -``` - -Next, copy the freshly made contents of '_site' over the old ones. +After this step you should see a folder `docs` under your projects root folder, which contains the generated Hakyll site. -> **Note:** Deleting a file from your site's source will not remove it from your `master` repository if it has already been published. An alternative to `cp` is discussed at the end of this guide. +Now we commit our changes: -``` -cp -a _site/. . -``` - -Commit our changes. - -``` +```bash git add -A git commit -m "Publish." ``` -And send them to GitHub. +And send them to GitHub: -``` +```bash git push origin master:master ``` -Final clean up and return to the original state. +That's all. -``` -git checkout develop -git branch -D master -git stash pop -``` +Within a few seconds your Hakyll site should be visible under your GitHub Pages URL! ## Putting it all together Below is a complete listing of all the commands used to automate deployment to Github Pages. A `deployCommand` can be set as part of Hakyll's configuration options. More information and an example is provided [here](https://jaspervdj.be/hakyll/reference/Hakyll-Core-Configuration.html). ``` -# Temporarily store uncommited changes -git stash - # Verify correct branch -git checkout develop +git checkout master # Build new files stack exec myblog clean stack exec myblog build -# Get previous files -git fetch --all -git checkout -b master --track origin/master - -# Overwrite existing files with new files -cp -a _site/. . - # Commit git add -A git commit -m "Publish." # Push git push origin master:master - -# Restoration -git checkout develop -git branch -D master -git stash pop -``` - -*And that's it.* - -## Removing old files with `rsync` - -Earlier it was mentioned a flaw is that deleted files will persist in the published site until deleted manually. This is easily overcome by using `rsync` instead of `cp`. - -``` -rsync -a --filter='P _site/' \ - --filter='P _cache/' \ - --filter='P .git/' \ - --filter='P .gitignore' \ - --filter='P .stack-work' \ - --delete-excluded \ - _site/ . ``` -The only drawback this approach has is the requirement that *every* file in your site "go through" Hakyll. Fortunately, in many cases this is not an issue. +*And that's it.* \ No newline at end of file -- cgit v1.2.3 From a5cf4470511bdf4fe7fe709b3dcf274fd9832d16 Mon Sep 17 00:00:00 2001 From: Jean-Charles Quillet Date: Sat, 6 Mar 2021 16:56:54 +0100 Subject: Add jeancharles.quillet.org to examples (#834) --- web/examples.markdown | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web') diff --git a/web/examples.markdown b/web/examples.markdown index 770eecb..4286d91 100644 --- a/web/examples.markdown +++ b/web/examples.markdown @@ -194,6 +194,8 @@ directly with the default Hakyll site. [source](https://github.com/thjread/thjread-blog) - , [source](https://github.com/xvw/planet) +- , + [source](https://github.com/jecaro/jeancharles.quillet) ## Hakyll 3.X -- cgit v1.2.3 From 04aa10917e7a004277e955048040dbb7c451e6d8 Mon Sep 17 00:00:00 2001 From: Norman Liu <57917002+dreamsmasher@users.noreply.github.com> Date: Fri, 12 Mar 2021 15:58:09 -0500 Subject: add nliu.net to examples for shameless self-promotion (#836) * added nliu.net to examples for shameless self-promotion * fixed comma formatting --- web/examples.markdown | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web') diff --git a/web/examples.markdown b/web/examples.markdown index 4286d91..c98937e 100644 --- a/web/examples.markdown +++ b/web/examples.markdown @@ -196,6 +196,8 @@ directly with the default Hakyll site. [source](https://github.com/xvw/planet) - , [source](https://github.com/jecaro/jeancharles.quillet) +- , + [source](https://github.com/dreamsmasher/site-haskell-source) ## Hakyll 3.X -- cgit v1.2.3 From 8980133284d7d5f0d7cd71580796150c74b22f2d Mon Sep 17 00:00:00 2001 From: Alexander Batischev Date: Wed, 26 May 2021 17:54:32 +0300 Subject: Docs: IRC channel moved from Freenode to Libera.Chat (#848) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's no mention of this on the issue tracker, so here's my recap of what led to this change. There is some drama around Freenode. Their volunteer staff quit[1]. Then the new-ish management started enacting strange policy changes[2] and take over the channels[3]. On June 26th 2021 Freenode's bot tried to take over #hakyll, but failed; however, it did succeed in #haskell and many, many other channels. For the preceding week, me and IRC user henk were trying to move the channel off the Freenode, either to Libera.Chat or OFTC. Jasper, the founder of Hakyll, was absent from IRC and didn't respond to my emails. Me and henk are the most active IRC users on the channel. Also, I have Collaborator access to the repo, and henk has chanop access to the IRC channel. We believe that at this time, we're the ones who are the best positioned to execute the move, so we're doing it. We only considered Libera.Chat and OFTC. Libera.Chat was created a week earlier by the same staff who quit Freenode; I personally consider them to be a spiritual successor of Freenode. OFTC is a well-established network with good governance documentation. Both networks are FOSS-friendly. The choice wasn't obvious. Libera.Chat was picked because 10 users moved there (and 1 more did while I was typing this!), whereas only 2 joined OFTC (me and henk, and those weren't votes for OFTC — we were just ensuring that the channel is ours). Also, #haskell and #ghc are on Libera too, so it makes sense for a Haskell project such as Hakyll to be present on Libera. For posterity: info #hakyll -ChanServ(ChanServ@services.)- Information on #hakyll: -ChanServ(ChanServ@services.)- Founder : jaspervdj -ChanServ(ChanServ@services.)- Registered : Mar 01 13:29:17 2011 (10y 12w 5d ago) -ChanServ(ChanServ@services.)- Mode lock : +ntc-slk -ChanServ(ChanServ@services.)- *** End of Info *** 1. https://kline.sh 2. https://github.com/freenode/web-7.0/pull/513 3. https://www.devever.net/~hl/freenode_abuse --- hakyll.cabal | 2 +- web/index.markdown | 3 ++- web/templates/tutorial.html | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'web') diff --git a/hakyll.cabal b/hakyll.cabal index b09aff0..89f251d 100644 --- a/hakyll.cabal +++ b/hakyll.cabal @@ -22,7 +22,7 @@ Description: . - * An IRC channel, @#hakyll@ on freenode + * An IRC channel, @#hakyll@ on irc.libera.chat (we *do not* have a channel on Freenode anymore) . diff --git a/web/index.markdown b/web/index.markdown index bde5289..fd4c6ff 100644 --- a/web/index.markdown +++ b/web/index.markdown @@ -39,4 +39,5 @@ using [stack] by using `stack install hakyll`. Then, you can: - read the [tutorials](/tutorials.html); - mail the [google discussion group](http://groups.google.com/group/hakyll); - ask questions on the IRC channel: `#hakyll` on - [freenode](http://freenode.net/). + [irc.libera.chat](https://libera.chat/) (we *do not* have a channel on + Freenode anymore). diff --git a/web/templates/tutorial.html b/web/templates/tutorial.html index 54af861..a9c4a27 100644 --- a/web/templates/tutorial.html +++ b/web/templates/tutorial.html @@ -18,4 +18,5 @@ you have a github account, you can use the If you run into any problems, all questions are welcome in the above google group, or you could try the IRC channel, #hakyll on -freenode. +irs.libera.chat (we do not have +a channel on Freenode anymore). -- cgit v1.2.3 From ef1e9b475cfd4886a01b0f26b9c4b30533fa7939 Mon Sep 17 00:00:00 2001 From: Alexander Batischev Date: Sat, 29 May 2021 23:11:05 +0300 Subject: Fix binary's name in the first tutorial (#849) Fixes #847. --- web/tutorials/01-installation.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/tutorials/01-installation.markdown b/web/tutorials/01-installation.markdown index c41d9a6..fb19026 100644 --- a/web/tutorials/01-installation.markdown +++ b/web/tutorials/01-installation.markdown @@ -51,11 +51,11 @@ use `cabal new-run site [command]`. You can build the site using: - my-site build + site build And preview (and build) it using: - my-site watch + site watch Using stack =========== -- cgit v1.2.3 From 0ad582562ba79e082417d5aaa3d7733859e55306 Mon Sep 17 00:00:00 2001 From: Alexander Batischev Date: Thu, 15 Jul 2021 18:50:47 +0300 Subject: Avoid "Empty 'do' block" error in GitHub tutorial (#861) Report and fix by @alexandroid000. Fixes #860. --- web/tutorials/github-pages-tutorial.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'web') diff --git a/web/tutorials/github-pages-tutorial.md b/web/tutorials/github-pages-tutorial.md index acecb38..2f6e82b 100644 --- a/web/tutorials/github-pages-tutorial.md +++ b/web/tutorials/github-pages-tutorial.md @@ -66,8 +66,7 @@ config = defaultConfiguration } main :: IO () -main = do - hakyllWith config $ do +main = hakyllWith config $ do ... ``` -- cgit v1.2.3