Current section
37 Versions
Jump to
Current section
37 Versions
Compare versions
5
files changed
+9
additions
-11
deletions
| @@ -17,7 +17,7 @@ _If you are having problems, view `README_INSTALL.md` for manual instructions._ | |
| 17 17 | |
| 18 18 | ```elixir |
| 19 19 | def deps do |
| 20 | - [{:thesis, "~> 0.0.13"}] |
| 20 | + [{:thesis, "~> 0.0.14"}] |
| 21 21 | end |
| 22 22 | |
| 23 23 | def application do |
| @@ -120,7 +120,7 @@ | |
| 120 120 | <<"package.json">>]}. |
| 121 121 | {<<"licenses">>,[<<"MIT">>]}. |
| 122 122 | {<<"links">>, |
| 123 | - [{<<"Docs">>,<<"https://hexdocs.pm/thesis/0.0.13/api-reference.html">>}, |
| 123 | + [{<<"Docs">>,<<"https://hexdocs.pm/thesis/0.0.14/api-reference.html">>}, |
| 124 124 | {<<"GitHub">>,<<"https://github.com/infinite_red/thesis">>}]}. |
| 125 125 | {<<"maintainers">>, |
| 126 126 | [<<"Jamon Holmgren">>,<<"Ken Miller">>,<<"Daniel Berkompas">>]}. |
| @@ -146,4 +146,4 @@ | |
| 146 146 | [{<<"app">>,<<"plug">>}, |
| 147 147 | {<<"optional">>,false}, |
| 148 148 | {<<"requirement">>,<<"~> 1.0">>}]}]}. |
| 149 | - {<<"version">>,<<"0.0.13">>}. |
| 149 | + {<<"version">>,<<"0.0.14">>}. |
| @@ -111,10 +111,9 @@ defmodule Thesis.View do | |
| 111 111 | iex> Thesis.View.page_title(conn, "Default Title") |
| 112 112 | "Default Title" |
| 113 113 | """ |
| 114 | - def page_title(%Plug.Conn{assigns: %{thesis_page: page}}, default) do |
| 115 | - page.title || default |
| 114 | + def page_title(conn, default) do |
| 115 | + current_page(conn).title || default |
| 116 116 | end |
| 117 | - def page_title(_conn, default), do: default |
| 118 117 | |
| 119 118 | @doc """ |
| 120 119 | Outputs the page title or a provided default. |
| @@ -130,10 +129,9 @@ defmodule Thesis.View do | |
| 130 129 | iex> Thesis.View.page_description(conn, "Default Description") |
| 131 130 | "Default Description" |
| 132 131 | """ |
| 133 | - def page_description(%Plug.Conn{assigns: %{thesis_page: page}}, default) do |
| 134 | - page.description || default |
| 132 | + def page_description(conn, default) do |
| 133 | + current_page(conn).description || default |
| 135 134 | end |
| 136 | - def page_description(_conn, default), do: default |
| 137 135 | |
| 138 136 | defp make_page(request_path) do |
| 139 137 | %Thesis.Page{slug: request_path} |
| @@ -1,6 +1,6 @@ | |
| 1 1 | defmodule Thesis.Mixfile do |
| 2 2 | use Mix.Project |
| 3 | - @version "0.0.13" # REMEMBER TO UPDATE package.json and README.md |
| 3 | + @version "0.0.14" # REMEMBER TO UPDATE package.json and README.md |
| 4 4 | |
| 5 5 | def project do |
| 6 6 | [ |
| @@ -1,6 +1,6 @@ | |
| 1 1 | { |
| 2 2 | "name": "thesis", |
| 3 | - "version": "0.0.13-dev", |
| 3 | + "version": "0.0.14-dev", |
| 4 4 | "main": "./priv/static/thesis.js", |
| 5 5 | "repository": {}, |
| 6 6 | "license" : "MIT", |