Cabal-Version: >= 1.2
Data-Files:
- defaultpages/Help/SampleImage/Large
- defaultpages/Help/SampleImage/Small
- defaultPages/Help/Syntax
- defaultPages/MainPage
- defaultPages/PageTitle
- defaultPages/SideBar/Left
- defaultPages/SideBar/Right
- defaultPages/StyleSheet/Default
+ defaultpages/Help/SampleImage/Large.xml
+ defaultpages/Help/SampleImage/Small.xml
+ defaultPages/Help/Syntax.xml
+ defaultPages/MainPage.xml
+ defaultPages/PageTitle.xml
+ defaultPages/SideBar/Left.xml
+ defaultPages/SideBar/Right.xml
+ defaultPages/StyleSheet/Default.xml
schemas/rakka-page-1.0.rng
Extra-Source-Files:
findAllIn dirPath
= find always (fileType ==? RegularFile) dirPath
>>=
- return . S.fromList . map (decodePageName . makeRelative dirPath)
+ return . S.fromList . map (decodePageName . makeRelative dirPath . dropExtension)
loadDefaultPage :: PageName -> IO (Maybe Page)
loadDefaultPage name
- -- ./defaultPages が存在するなら、./defaultPages/Foo を探す。無けれ
- -- ã\81° Cabal ã\81§ defaultPages/Foo を探す。
- = do let pagePath = "defaultPages" </> encodePageName name
+ -- ./defaultPages が存在するなら、./defaultPages/Foo.xml を探す。無
+ -- ã\81\91ã\82\8cã\81° Cabal ã\81§ defaultPages/Foo.xml を探す。
+ = do let pagePath = "defaultPages" </> (encodePageName name `addExtension` "xml")
localDirExists <- doesLocalDirExist
if localDirExists then
DirNode -> traverse path
decodePath :: FilePath -> PageName
- decodePath = decodePageName . makeRelative root
+ decodePath = decodePageName . makeRelative root . dropExtension
loadPageInRepository :: Repository -> PageName -> Maybe RevNum -> IO (Maybe Page)
-> return Nothing
where
path :: FilePath
- path = "pages" </> encodePageName name
+ path = "pages" </> (encodePageName name `addExtension` "page")
loadPage' :: Rev Page
loadPage' = do redirect <- getNodeProp path "rakka:redirect"