parseJekyllFilename :: FilePath -> (String, String, String, String)
parseJekyllFilename fn =
  case T.splitOn "-" (T.pack fn) of
    y : m : d : rest ->
      (T.unpack y, T.unpack m, T.unpack d, T.unpack $ T.intercalate "-" rest)
    _ ->
      error "Malformed filename"

-- | Main entry point to our generator.
--
-- `Rib.run` handles CLI arguments, and takes three parameters here.
--
-- 1. Directory `content`, from which static files will be read.
-- 2. Directory `dest`, under which target files will be generated.
-- 3. Shake action to run.
--
-- In the shake action you would expect to use the utility functions
-- provided by Rib to do the actual generation of your static site.
parseJekyllFilename :: FilePath -> (String, String, String, String)
parseJekyllFilename fn =
  case T.splitOn "-" (T.pack fn) of
    y : m : d : rest ->
      (T.unpack y, T.unpack m, T.unpack d, T.unpack $ T.intercalate "-" rest)
    _ ->
      error "Malformed filename"

-- | Main entry point to our generator.
--
-- `Rib.run` handles CLI arguments, and takes three parameters here.
--
-- 1. Directory `content`, from which static files will be read.
-- 2. Directory `dest`, under which target files will be generated.
-- 3. Shake action to run.
--
-- In the shake action you would expect to use the utility functions
-- provided by Rib to do the actual generation of your static site.
parseJekyllFilename fn =
  case T.splitOn "-" (T.pack fn) of
    y : m : d : rest ->
      (T.unpack y, T.unpack m, T.unpack d, T.unpack $ T.intercalate "-" rest)
    _ ->
      error "Malformed filename"

-- | Main entry point to our generator.
--
-- `Rib.run` handles CLI arguments, and takes three parameters here.
--
-- 1. Directory `content`, from which static files will be read.
-- 2. Directory `dest`, under which target files will be generated.
-- 3. Shake action to run.
--
-- In the shake action you would expect to use the utility functions
-- provided by Rib to do the actual generation of your static site.