servant-seo-0.1.0: Generate Robots.txt and Sitemap.xml specification for your servant API.

Safe HaskellNone
LanguageHaskell2010

Servant.Seo.Robots

Contents

Synopsis

Robots.txt

RobotsInfo

data RobotsInfo Source #

Intermediate structure representing robots.txt file. All API parts marked as Disallow would be aggregated into RobotsInfo during compilation and translated to robots.txt content.

Constructors

RobotsInfo 

Fields

Instances
Eq RobotsInfo Source # 
Instance details

Defined in Servant.Seo.Robots

Show RobotsInfo Source # 
Instance details

Defined in Servant.Seo.Robots

Generic RobotsInfo Source # 
Instance details

Defined in Servant.Seo.Robots

Associated Types

type Rep RobotsInfo :: Type -> Type #

Semigroup RobotsInfo Source # 
Instance details

Defined in Servant.Seo.Robots

Monoid RobotsInfo Source #

Empty unit of RobotsInfo.

Instance details

Defined in Servant.Seo.Robots

type Rep RobotsInfo Source # 
Instance details

Defined in Servant.Seo.Robots

type Rep RobotsInfo = D1 (MetaData "RobotsInfo" "Servant.Seo.Robots" "servant-seo-0.1.0-inplace" False) (C1 (MetaCons "RobotsInfo" PrefixI True) (S1 (MetaSel (Just "_robotsSitemapPath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe ())) :*: S1 (MetaSel (Just "_robotsDisallowedPaths") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [DisallowedPathPiece])))

newtype DisallowedPathPiece Source #

Part of URL that should be present in robots file.

Instances
Eq DisallowedPathPiece Source # 
Instance details

Defined in Servant.Seo.Robots

Ord DisallowedPathPiece Source # 
Instance details

Defined in Servant.Seo.Robots

Show DisallowedPathPiece Source # 
Instance details

Defined in Servant.Seo.Robots

Generic DisallowedPathPiece Source # 
Instance details

Defined in Servant.Seo.Robots

Associated Types

type Rep DisallowedPathPiece :: Type -> Type #

ToMarkup DisallowedPathPiece Source # 
Instance details

Defined in Servant.Seo.Robots

type Rep DisallowedPathPiece Source # 
Instance details

Defined in Servant.Seo.Robots

type Rep DisallowedPathPiece = D1 (MetaData "DisallowedPathPiece" "Servant.Seo.Robots" "servant-seo-0.1.0-inplace" True) (C1 (MetaCons "DisallowedPathPiece" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

HasRobots

class HasRobots a where Source #

Servant API extension. It describes how to build RobotsInfo from servant API. Most of types add nothing to it.

Instances
HasRobots EmptyAPI Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy EmptyAPI -> RobotsInfo Source #

HasRobots Raw Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy Raw -> RobotsInfo Source #

(HasRobots a, HasRobots b) => HasRobots (a :<|> b :: Type) Source #

Collect different path pieces.

Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (a :<|> b) -> RobotsInfo Source #

HasRobots sub => HasRobots (HttpVersion :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (HttpVersion :> sub) -> RobotsInfo Source #

(KnownSymbol sym, HasRobots sub) => HasRobots (Capture' mods sym a :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Capture' mods sym a :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (CaptureAll sym a :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (CaptureAll sym a :> sub) -> RobotsInfo Source #

HasRobots api => HasRobots (Description desc :> api :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Description desc :> api) -> RobotsInfo Source #

HasRobots api => HasRobots (Summary desc :> api :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Summary desc :> api) -> RobotsInfo Source #

HasRobots sub => HasRobots (Header' mods sym a :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Header' mods sym a :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (IsSecure :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (IsSecure :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (QueryFlag sym :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (QueryFlag sym :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (QueryParam' mods sym a :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (QueryParam' mods sym a :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (QueryParams sym a :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (QueryParams sym a :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (RemoteHost :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (RemoteHost :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (ReqBody' mods cs a :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (ReqBody' mods cs a :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (StreamBody' mods fr ct a :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (StreamBody' mods fr ct a :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (Vault :> sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Vault :> sub) -> RobotsInfo Source #

HasRobots api => HasRobots (Priority priority :> api :: Type) Source #

Priority as part of sitemap.xml spec has no impact on robots.txt.

Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Priority priority :> api) -> RobotsInfo Source #

(HasPeriod period, HasRobots api) => HasRobots (Frequency period :> api :: Type) Source #

Frequency as part of sitemap.xml spec has no impact on robots.txt.

Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Frequency period :> api) -> RobotsInfo Source #

(HasRobots sub, KnownSymbol sym) => HasRobots (Disallow sym :> sub :: Type) Source #

Generate new DisallowedPathPiece from path piece marked as Disallow.

Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Disallow sym :> sub) -> RobotsInfo Source #

(HasRobots sub, KnownSymbol sym) => HasRobots (sym :> sub :: Type) Source #

Append path piece to existing DisallowedPathPiece.

Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (sym :> sub) -> RobotsInfo Source #

HasRobots sub => HasRobots (WithNamedContext x c sub :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (WithNamedContext x c sub) -> RobotsInfo Source #

KnownNat status => HasRobots (Verb method status cs (Headers hs a) :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Verb method status cs (Headers hs a)) -> RobotsInfo Source #

KnownNat status => HasRobots (Verb method status cs (Headers hs NoContent) :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Verb method status cs (Headers hs NoContent)) -> RobotsInfo Source #

KnownNat status => HasRobots (Verb method status cs a :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Verb method status cs a) -> RobotsInfo Source #

KnownNat status => HasRobots (Verb method status cs NoContent :: Type) Source # 
Instance details

Defined in Servant.Seo.Robots

Methods

toRobots :: Proxy (Verb method status cs NoContent) -> RobotsInfo Source #