Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid conflict with getRobotsR and getFaviconR when subsite.

Previously gitit2 didn't work well as a subsite when the main
site defined getRobotsR or getFaviconR, since it exported these
itself.  Now it exports getGititRobotsR and getGititFaviconR
instead, so there is no conflict.

Closes #3, I believe.
  • Loading branch information...
commit 96a07bc5802b693101f3f75c9e14db98c316463f 1 parent b6aa254
John MacFarlane authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 Network/Gitit2.hs
View
12 Network/Gitit2.hs
@@ -60,7 +60,7 @@ import Control.Exception (throw, handle, try)
import Text.Highlighting.Kate
import Data.Time (getCurrentTime, addUTCTime)
import Yesod.AtomFeed
-import Yesod.Default.Handlers (getFaviconR, getRobotsR)
+import Yesod.Default.Handlers (getRobotsR, getFaviconR)
import Data.Yaml
import System.Directory
import System.Time (ClockTime (..), getClockTime)
@@ -231,8 +231,8 @@ mkYesodSub "Gitit" [ ClassP ''HasGitit [VarT $ mkName "master"]
/_static StaticR Static getStatic
/_index IndexBaseR GET
/_index/*Page IndexR GET
-/favicon.ico FaviconR GET
-/robots.txt RobotsR GET
+/favicon.ico GititFaviconR GET
+/robots.txt GititRobotsR GET
/_random RandomR GET
/_raw/*Page RawR GET
/_edit/*Page EditR GET
@@ -434,6 +434,12 @@ isSourceFile path' = do
return $ not (null langs || takeExtension path' == ".svg")
-- allow svg to be served as image
+getGititRobotsR :: GH m RepPlain
+getGititRobotsR = getRobotsR
+
+getGititFaviconR :: GH m ()
+getGititFaviconR = getFaviconR
+
getHomeR :: HasGitit master => GH master RepHtml
getHomeR = do
conf <- getConfig
Please sign in to comment.
Something went wrong with that request. Please try again.