hard cap title at 69 characters max (nice)

This commit is contained in:
Kyle Drake 2025-08-13 10:23:07 -05:00
parent 585b28017d
commit 352e02deba

View file

@ -58,9 +58,19 @@ end
def title
out = "Neocities"
return out if request.path == '/'
return "#{out} - #{@title}" if @title
"#{out} - #{request.path.gsub('/', '').capitalize}"
return out if request.path == '/'
full_title = if @title
"#{out} - #{@title}"
else
"#{out} - #{request.path.gsub('/', '').capitalize}"
end
if full_title.length >= 70
full_title[0..65] + "..."
else
full_title
end
end
def encoding_fix(file)