Skip to content

Commit

Permalink
add meta description
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed Mar 10, 2013
1 parent 7386024 commit 7bf3b47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions views/layout.moon
Expand Up @@ -19,11 +19,16 @@ class Layout extends Widget
content: =>
html_5 ->
head ->
meta charset: "utf-8"
title ->
if @title
text "#{@title} - MoonRocks"
else
text "MoonRocks"

if @page_description
meta name: "description", content: @page_description

link rel: "stylesheet", href: "/static/style.css"
script type: "text/javascript", src: "/static/main.js"
raw [[
Expand Down
4 changes: 4 additions & 0 deletions web.moon
Expand Up @@ -174,6 +174,8 @@ lapis.serve class extends lapis.Application
}

[index: "/"]: =>
@page_description = "A website for submitting and distributing Lua rocks"

@recent_modules = Modules\select "order by created_at desc limit 5"
Users\include_in @recent_modules, "user_id"
@popular_modules = Modules\select "order by downloads desc limit 5"
Expand Down Expand Up @@ -221,6 +223,8 @@ lapis.serve class extends lapis.Application
[module: "/modules/:user/:module"]: =>
load_module @
@title = "#{@module.name}"
@page_description = @module.summary if @module.summary

@versions = Versions\select "where module_id = ? order by created_at desc", @module.id
@manifests = @module\all_manifests!

Expand Down

0 comments on commit 7bf3b47

Please sign in to comment.