Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Allow tutorials outside of haskell - #54

Merged
javcasas merged 6 commits into
tutorialsfrom
allow_tutorials_outside_of_haskell
Jul 14, 2017
Merged

Allow tutorials outside of haskell#54
javcasas merged 6 commits into
tutorialsfrom
allow_tutorials_outside_of_haskell

Conversation

@javcasas

Copy link
Copy Markdown
Contributor

It seems the system only allows tutorials to be placed on a haskell directory inside tutorials. Looking forward to make tutorials on other programming languages.

@javcasas
javcasas force-pushed the allow_tutorials_outside_of_haskell branch from f0f07c7 to 2c7200d Compare July 13, 2017 22:29
@javcasas javcasas added status: in progress bug Something isn't working labels Jul 13, 2017
Comment thread app/Main.hs Outdated
route idRoute
compile $ do
tutorials <- recentFirst =<< loadAll "tutorials/haskell/*/*.md"
tutorials <- recentFirst =<< loadAll "tutorials/(haskell|functional-full-stack)/*/*.md"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javcasas You can use Hakyll's (.||.) and make it a pattern to reuse everywhere:

pattern :: [Pattern]
pattern =
  "tutorials/functional-full-stack/*/*.md"
    .||. "tutorials/haskell/*/*.md"

Alternatively, make a list of languages (or some other name) and map over each one to make a list of patterns, and then fold using (.||.).

Or use Hakyll's fromRegex if you really want to use something besides *.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the unix-like regex doesn't work. In fact, I figured out it's wrong, it should have been something like {haskell,functional-full-stack} (parentheses + commas). I have rebuilt it as fold with a list of programming languages.

---
title: Connecting a Haskell Backend to a PureScript Frontend
published: not-yet
published: 2017-07-17

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hakyll was choking on this. Also Cynthia is trying to get it published this day, so I'll give her that.

@javcasas

Copy link
Copy Markdown
Contributor Author

It seems the images are expected to be shown on local (I assumed they didn't have to). I'll fix that.

@juanpaucar juanpaucar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you very much

@javcasas
javcasas merged commit c68532c into tutorials Jul 14, 2017
@javcasas
javcasas deleted the allow_tutorials_outside_of_haskell branch July 14, 2017 15:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants