summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-09 21:33:45 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-09 21:33:45 -0500
commitfe33e4d10007da73c33698f9369460c2c37f1933 (patch)
treecacf4c62a43719de3f43980675cf94334036ab05 /lib
parent4084de4c44b8494c73d31b62de90aad845829877 (diff)
Have index page titles default to be the basename of the directory.
Diffstat (limited to 'lib')
-rw-r--r--lib/page_index.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/page_index.rb b/lib/page_index.rb
index 6ae4318..43bf367 100644
--- a/lib/page_index.rb
+++ b/lib/page_index.rb
@@ -70,7 +70,7 @@ class IndexPage < LocalPage
return ret.gsub(/\n\n+/, "\n\n")
end
def index_title
- _metadata['title']
+ _metadata['title'] || File::basename(local_infile)
end
def index_author
Person::new(_metadata['author'] || Config::get.default_author)