Module: Wytch::SitemapHelper

Defined in:
lib/wytch/sitemap_helper.rb

Overview

Helper module for sitemap pages.

This module provides methods to configure a page as a sitemap. It sets the correct path, build path, and excludes the sitemap itself from appearing in the sitemap.

Examples:

Using in a content file (content/sitemap.rb)

view Wytch::SitemapView
add Wytch::SitemapHelper

Instance Method Summary collapse

Instance Method Details

#build_pathString

Returns the build path for the sitemap.

Returns:

  • (String)

    "sitemap.xml"



24
25
26
# File 'lib/wytch/sitemap_helper.rb', line 24

def build_path
  "sitemap.xml"
end

#include_in_sitemap?Boolean

Excludes the sitemap from appearing in the sitemap.

Returns:

  • (Boolean)

    false



31
32
33
# File 'lib/wytch/sitemap_helper.rb', line 31

def include_in_sitemap?
  false
end

#pathString

Returns the URL path for the sitemap.

Returns:

  • (String)

    "/sitemap.xml"



17
18
19
# File 'lib/wytch/sitemap_helper.rb', line 17

def path
  "/sitemap.xml"
end