mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-25 09:21:57 +03:00
Rename function.
This commit is contained in:
parent
7f14f6171a
commit
e1b4d90087
@ -24,7 +24,7 @@ blogPostsGlob =
|
||||
|> Glob.ignore (Glob.literal "content/blog/")
|
||||
|> Glob.capture Glob.wildcard
|
||||
|> Glob.ignore (Glob.literal ".md")
|
||||
|> Glob.toStaticHttp
|
||||
|> Glob.toDataSource
|
||||
|
||||
|
||||
allMetadata : DataSource.DataSource (List ( PagePath, ArticleMetadata ))
|
||||
|
@ -269,7 +269,7 @@ articlesRequest =
|
||||
|> Glob.ignore (Glob.literal "content/blog/")
|
||||
|> Glob.ignore Glob.wildcard
|
||||
|> Glob.ignore (Glob.literal ".md")
|
||||
|> Glob.toStaticHttp
|
||||
|> Glob.toDataSource
|
||||
|> DataSource.andThen
|
||||
(\articleFilePaths ->
|
||||
articleFilePaths
|
||||
|
@ -1,6 +1,7 @@
|
||||
module Glob exposing
|
||||
( Glob, atLeastOne, extractMatches, fullFilePath, literal, map, not, notOneOf, oneOf, recursiveWildcard, run, singleFile, succeed, toNonEmptyWithDefault, toPattern, toStaticHttp, wildcard, zeroOrMore
|
||||
( Glob, atLeastOne, extractMatches, fullFilePath, literal, map, not, notOneOf, oneOf, recursiveWildcard, run, singleFile, succeed, toNonEmptyWithDefault, toPattern, wildcard, zeroOrMore
|
||||
, capture, ignore
|
||||
, toDataSource
|
||||
)
|
||||
|
||||
{-|
|
||||
@ -304,8 +305,8 @@ type alias RawGlob =
|
||||
|
||||
|
||||
{-| -}
|
||||
toStaticHttp : Glob a -> DataSource.DataSource (List a)
|
||||
toStaticHttp glob =
|
||||
toDataSource : Glob a -> DataSource.DataSource (List a)
|
||||
toDataSource glob =
|
||||
DataSource.Http.get (Secrets.succeed <| "glob://" ++ toPattern glob)
|
||||
(OptimizedDecoder.map2 RawGlob
|
||||
(OptimizedDecoder.string |> OptimizedDecoder.list |> OptimizedDecoder.field "captures")
|
||||
@ -322,7 +323,7 @@ singleFile filePath =
|
||||
succeed identity
|
||||
|> ignore (literal filePath)
|
||||
|> capture fullFilePath
|
||||
|> toStaticHttp
|
||||
|> toDataSource
|
||||
|> DataSource.andThen
|
||||
(\globResults ->
|
||||
case globResults of
|
||||
|
Loading…
Reference in New Issue
Block a user