yesod-articles alternatives and similar packages
Based on the "yesod" category.
Alternatively, view yesod-articles alternatives based on common mentions on social networks and blogs.
-
yesod-persistent
A RESTful Haskell web framework built on WAI. -
yesod-fay
Utilities for using the Fay Haskell-to-JS compiler with Yesod. -
yesod-dsl
A domain specific language and a code generator desined to create RESTful services for managing an RDBMS with Yesod web framework and Persistent. -
yesod-crud
Generic administrative CRUD operations as a Yesod subsite -
yesod-auth-hashdb
Yesod.Auth.HashDB plugin, now moved out of main yesod-auth package -
yesod-auth-fb
Authentication backend for Yesod using Facebook. -
yesod-routes-typescript
generate TypeScript routes for Yesod -
yesod-recaptcha
Dead simple support for reCAPTCHA on Yesod applications. -
yesod-content-pdf
Library for serving PDF content from a Yesod Application -
yesod-comments
Drop-in comments module for a Yesod application -
yesod-form-bootstrap4
yesod-form for bootstrap version 4 -
yesod-worker
Drop-in(ish) background worker system for Yesod applications -
yesod-auth-account-fork
Fork of yesod-auth-account with a few additions -
yesod-transloadit
A resuable widget for the Transloadit service & Yesod -
yesod-raml
Generate Yesod framework route definitions, documentaiton, mock-handler, and more from your RAML spec. -
yesod-crud-persist
Easy CRUD subsites for yesod with persistent -
yesod-auth-smbclient
Authentication plugin for Yesod using smbclient -
yesod-datatables
Routines for implementing server-side processing for DataTables (jQuery grid) in Haskell -
yesod-auth-zendesk
Zendesk remote authentication support for Yesod apps. -
yesod-auth-hmac-keccak
An account authentication plugin for yesod with encrypted token transfer. -
yesod-auth-bcrypt
BCrypt salted and hashed passwords in a database as auth for yesod -
yesod-auth-deskcom
Desk.com Multipass support for Yesod apps. -
yesod-pnotify
yet another getMessage/setMessage using pnotify jquery plugins -
yesod-test-json
Utility functions for testing JSON web services written in Yesod -
yesod-auth-ldap-native
Yesod LDAP authentication plugin using native Haskell Ldap.Client -
yesod-paypal-rest
Yesod plugin to use PayPal with the paypal-rest-client library. -
yesod-s3
Simple Helper Library for using Amazon's Simple Storage Service (S3) with Yesod
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of yesod-articles or a related project?
README
Yesod.Articles
This library provides three core functions for automatically generating a homepage with articles, with separate pages for each article.
makeGets
and makeGetsWithOptions
should be spliced in at/near the top
of the file where you will put the handler for your homepage.
makeGets
will call makeGetsWithOptions
with the following args:
prefix = ""
This is the prefix for the<title>
tag of each article page, for example in my website, the prefix is "Matt Eads:", so each page title will be "Matt Eads: "path = "templates/articles"
This is the directory where all your<article>.hamlet
files live.exp = return (VarE (mkName "defaultLayout"))
This one makes me uneasy, and I will probably change it soon. The purpose of this argument is to wrapdo {$(whamletFile <article>.hamlet)}
. In my website, I pass in[e|\x -> do defaultLayout $ x|]
, which is probably a good idea for you too.
Because of the wonderful type-safety-ness of all of Yesod's links, it is impossible,
or at least infeasible, to generate truly separate pages for each article.
Instead the workaround that I use is to generate a getArticleR
handler, which
takes in an argument from the url, this is used to then defer to the appropriate
handler function (ex: getArticleR "foo"
will return the getFooR
function).
However, you still need to make sure you put this in your routes file,
specifically in addition to any other routes you have, you need to add
!/articles/#Text ArticleR GET
.
Inside your handler for your homepage (ex: getHomeR
), you should
splice in makePreviews
or makePreviewsWithOptions
. These will generate all
the previews for your articles, as well as a 'Read More...' link to the full article.
This will fail if you haven't first spliced in makeGets
or its sibling.
Currently the only option for makePreviewsWithOptions
is the path, which is used
in the same way as in makeGetsWithOptions
, and is defaulted to templates/articles
.
The path is also the only option for makeContentsWithOptions
. makeContents
is optional,
and if spliced in (ideally before makePreviews
) will generate a small table of contents.
Here my Home.hs
file for reference:
module Handler.Home where
import Import
import Yesod.Articles
-- $(makeGetsWithOptions "Matt Eads:" "templates/articles" [e|(\x -> do defaultLayout $ x)|])
$(makeGets)
getHomeR :: Handler Html
getHomeR = do
defaultLayout $ do
setTitle "Matt Eads"
$(makeContents)
$(makePreviewsWithOptions "templates/articles/")
getAboutR :: Handler Html
getAboutR = defaultLayout $
do {
setTitle "Matt Eads: About";
$(widgetFile "about");
}