Skip to content

MarcoDaniels/elm-robots-humans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-robots-humans

elm-robots-humans allows you to write your website's robots.txt and humans.txt files as an output string in a structured and typed manner.

Example for robots.txt:

import Robots

robots: String
robots =
    Robots.robots
        { sitemap = Robots.SingleValue "/sitemap.xml"
        , host = "https://marcodaniels.com"
        , policies =
            [ Robots.policy
                { userAgent = Robots.SingleValue "*"
                , allow = Just (Robots.SingleValue "*")
                , disallow = Nothing
                }
            ]
        }

Example for humans.txt

import Humans

humans: String
humans =
    Humans.humans
        [ { headline = "Team"
          , content = [ "Engineer: Marco Martins" ]
          }
        , { headline = "Technology"
          , content = [ "elm, terraform, nix" ]
          }
        ]