class Clayoven::Toplevel::ContentPage

A “content page”

For .clay files nested within subdirectories, with a corresponding #{subdirectory}.index.clay in the ancestor directory.

Attributes

subtopic[RW]

The specific “subtopic” under which this ContentPage sits

topic[RW]

The specific “topic” under which this ContentPage sits

Public Class Methods

new(filename, git) click to toggle source

Initialize Page#topic, Page#subtopic, Page#permalink, and Page#target

Calls superclass method Clayoven::Toplevel::Page::new
# File lib/clayoven/toplevel.rb, line 123
def initialize(filename, git)
  super
  # There cannot be ContentPages nested under 'index'
  @topic, @subtopic, = @filename.split '/', 3
  @subtopic = nil if @subtopic.end_with?('.clay')
  @permalink = @filename.split('.clay').first
  @target = "#{@permalink}.html"
end