+fallbackRender :: Environment -> [String] -> IO (Maybe ResourceDef)
+fallbackRender env path
+ | null path = return Nothing
+ | null $ head path = return Nothing
+ | not $ isUpper $ head $ head path = return Nothing -- /Foo/bar のような形式でない。
+ | otherwise
+ = return $ Just $ ResourceDef {
+ resUsesNativeThread = False
+ , resIsGreedy = True
+ , resGet = Just $ handleGet env (toPageName path)
+ , resHead = Nothing
+ , resPost = Nothing
+ , resPut = Nothing
+ , resDelete = Nothing
+ }
+ where
+ toPageName :: [String] -> PageName
+ toPageName = decodePageName . dropExtension . joinWith "/"
+
+