all repos — h3rald @ 67e64416e3f40fa08f11456ab72586aaaada5b16

The sources of https://h3rald.com

Added dynamic keyword generation.
* Closes #36.
h3rald h3rald@h3rald.com
Fri, 11 Sep 2009 12:28:41 +0200
commit

67e64416e3f40fa08f11456ab72586aaaada5b16

parent

a265f8877f84e6fee7633b34447a94995835332c

1 files changed, 13 insertions(+), 1 deletions(-)

jump to
M layouts/default.erblayouts/default.erb

@@ -18,7 +18,19 @@ <meta name="language" content="en" />

<meta name="target_country" content="en-us" /> <meta name="country" content="United States" /> <meta name="description" content="H3RALD - Fabio Cevasco's Web Site" /> - <meta name="keywords" content="h3rald, fabio cevasco, ruby, rails technical writing, reviews, software, browsers, cakephp, genova, technical articles" /> + <% + min_keywords = "h3rald, fabio cevasco, " + default = "ruby, rails technical writing, reviews, software, browsers, articles, traveling, books, genova" + case @item[:type] + when 'article' then + keywords = min_keywords+@item[:tags].join(', ') + when 'project' then + keywords = @item.permalink == 'h3rald' ? "fabio cevasco, "+@item[:permalink] : min_keywords+@item[:permalink] + else + keywords = min_keywords+default + end + %> + <meta name="keywords" content="<%= keywords %>" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta content="44.388041;9.073248" name="ICBM" />