put pronoun examples in meta description for #56

This commit is contained in:
Morgan Astra 2017-03-08 12:30:45 -08:00
parent 3dce2d2dae
commit b16cf5d7c9
2 changed files with 8 additions and 2 deletions

View File

@ -118,16 +118,18 @@
(defn format-pronoun-examples (defn format-pronoun-examples
[pronoun-declensions] [pronoun-declensions]
(let [sub-objs (map #(s/join "/" (take 2 %)) pronoun-declensions) (let [sub-objs (map #(s/join "/" (take 2 %)) pronoun-declensions)
title (str "Pronoun Island: " (prose-comma-list sub-objs) " examples")] title (str "Pronoun Island: " (prose-comma-list sub-objs) " examples")
examples (map #(apply examples-block %) pronoun-declensions)]
(html (html
[:html [:html
[:head [:head
[:title title] [:title title]
[:meta {:name "viewport" :content "width=device-width"}] [:meta {:name "viewport" :content "width=device-width"}]
[:meta {:name "description" :content (u/strip-markup examples)}]
[:link {:rel "stylesheet" :href "/pronouns.css"}]] [:link {:rel "stylesheet" :href "/pronouns.css"}]]
[:body [:body
(header-block title) (header-block title)
(map #(apply examples-block %) pronoun-declensions) examples
(footer-block)]]))) (footer-block)]])))
(defn lookup-pronouns [pronouns-string] (defn lookup-pronouns [pronouns-string]

View File

@ -103,3 +103,7 @@
<x> is already in a sequence for which vector? is false, this will add <x> is already in a sequence for which vector? is false, this will add
another layer of nesting." another layer of nesting."
(if (vector? x) x [x])) (if (vector? x) x [x]))
(defn strip-markup [form]
(s/join " " (filter string? (flatten form))))