From 7ec49b9680efc26ae42082698ee11afe34e93549 Mon Sep 17 00:00:00 2001 From: Jamon Holmgren Date: Fri, 12 Apr 2019 21:03:00 -0700 Subject: [PATCH] Version 0.3.4 --- .gitignore | 1 + README.md | 2 +- README_INSTALL.md | 2 +- doc/404.html | 4 +- doc/Mix.Tasks.Thesis.Install.html | 6 +-- doc/Thesis.Auth.html | 16 +++---- doc/Thesis.Backup.html | 6 +-- doc/Thesis.Controller.Plug.html | 6 +-- doc/Thesis.Controller.html | 16 +++---- doc/Thesis.EctoStore.html | 10 ++-- doc/Thesis.File.html | 6 +-- doc/Thesis.Notifications.html | 38 ++++++++-------- doc/Thesis.Page.html | 12 ++--- doc/Thesis.PageContent.html | 30 ++++++------ doc/Thesis.Render.html | 6 +-- doc/Thesis.RepoUploader.html | 6 +-- doc/Thesis.Router.html | 16 +++---- doc/Thesis.S3Uploader.html | 6 +-- doc/Thesis.Store.html | 14 +++--- doc/Thesis.Uploader.html | 6 +-- doc/Thesis.Utilities.html | 36 +++++++-------- doc/Thesis.View.html | 76 +++++++++++++++---------------- doc/Thesis.html | 6 +-- doc/api-reference.html | 6 +-- doc/index.html | 2 +- doc/search.html | 4 +- mix.exs | 2 +- package.json | 2 +- 28 files changed, 172 insertions(+), 171 deletions(-) diff --git a/.gitignore b/.gitignore index 460d82f..46a2c33 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ yarn-error.log nohup.out yarn-error.log package-lock.json +.vscode diff --git a/README.md b/README.md index 4653346..8acbbb1 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ _If you are having problems, view `README_INSTALL.md` for manual instructions._ ```elixir def deps do - [{:thesis, "~> 0.3.3"}] + [{:thesis, "~> 0.3.4"}] end def application do diff --git a/README_INSTALL.md b/README_INSTALL.md index d645419..151f158 100644 --- a/README_INSTALL.md +++ b/README_INSTALL.md @@ -6,7 +6,7 @@ For automatic setup, see `README.md`. ```elixir def deps do - [{:thesis, "~> 0.3.3"}] + [{:thesis, "~> 0.3.4"}] end def application do diff --git a/doc/404.html b/doc/404.html index 99551ae..7bf256e 100644 --- a/doc/404.html +++ b/doc/404.html @@ -5,7 +5,7 @@ - 404 — thesis v0.3.3 + 404 — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

diff --git a/doc/Mix.Tasks.Thesis.Install.html b/doc/Mix.Tasks.Thesis.Install.html index 1d49810..199ea7f 100644 --- a/doc/Mix.Tasks.Thesis.Install.html +++ b/doc/Mix.Tasks.Thesis.Install.html @@ -5,7 +5,7 @@ - thesis.install — thesis v0.3.3 + thesis.install — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 mix thesis.install

diff --git a/doc/Thesis.Auth.html b/doc/Thesis.Auth.html index 05089f7..e0834a8 100644 --- a/doc/Thesis.Auth.html +++ b/doc/Thesis.Auth.html @@ -5,7 +5,7 @@ - Thesis.Auth — thesis v0.3.3 + Thesis.Auth — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Auth behaviour

@@ -125,14 +125,14 @@

page_is_editable?(arg0) whether to load and display the Thesis editor and also whether to allow updates to Thesis.Page and Thesis.PageContent areas.

Typical example:

-
defmodule MyApp.ThesisAuth do
+
defmodule MyApp.ThesisAuth do
   @behaviour Thesis.Auth
 
-  def page_is_editable?(conn) do
+  def page_is_editable?(conn) do
     conn
-    |> MyApp.AuthController.current_user_is_admin?(conn)
-  end
-end
+
|> MyApp.AuthController.current_user_is_admin?(conn) + end +end
diff --git a/doc/Thesis.Backup.html b/doc/Thesis.Backup.html index 97bb19b..93d3040 100644 --- a/doc/Thesis.Backup.html +++ b/doc/Thesis.Backup.html @@ -5,7 +5,7 @@ - Thesis.Backup — thesis v0.3.3 + Thesis.Backup — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Backup

diff --git a/doc/Thesis.Controller.Plug.html b/doc/Thesis.Controller.Plug.html index 4731079..aba677a 100644 --- a/doc/Thesis.Controller.Plug.html +++ b/doc/Thesis.Controller.Plug.html @@ -5,7 +5,7 @@ - Thesis.Controller.Plug — thesis v0.3.3 + Thesis.Controller.Plug — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Controller.Plug

diff --git a/doc/Thesis.Controller.html b/doc/Thesis.Controller.html index 01efe89..81ca1d1 100644 --- a/doc/Thesis.Controller.html +++ b/doc/Thesis.Controller.html @@ -5,7 +5,7 @@ - Thesis.Controller — thesis v0.3.3 + Thesis.Controller — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Controller

@@ -67,16 +67,16 @@

Provides a plug that preloads any Thesis content for a page. Typically, you'll add this to your web/web.ex file, under the controller function:

-
def controller do
-  quote do
+
def controller do
+  quote do
     use Phoenix.Controller
     use Thesis.Controller
     # ...
-  end
-end
+
end +end

If you'd prefer to only use Thesis in certain controllers, remove it from web/web.ex and add it to the specific controllers by doing this:

-
defmodule MyApp.MyController do
+
defmodule MyApp.MyController do
   use Thesis.Controller
   # ...
diff --git a/doc/Thesis.EctoStore.html b/doc/Thesis.EctoStore.html index 4c7ee2a..bc9ed32 100644 --- a/doc/Thesis.EctoStore.html +++ b/doc/Thesis.EctoStore.html @@ -5,7 +5,7 @@ - Thesis.EctoStore — thesis v0.3.3 + Thesis.EctoStore — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.EctoStore

@@ -171,7 +171,7 @@

backups(page_slug)

Retrieves all backups for a given slug. Returns the backup.

-
backups(slug)
+
backups(slug)

Callback implementation for Thesis.Store.backups/1.

@@ -261,7 +261,7 @@

restore(id)

Retrieves a given backup (identified by its id). Returns the backup.

-
restore(backup_id)
+
restore(backup_id)

Callback implementation for Thesis.Store.restore/1.

diff --git a/doc/Thesis.File.html b/doc/Thesis.File.html index 6368b14..baf1af1 100644 --- a/doc/Thesis.File.html +++ b/doc/Thesis.File.html @@ -5,7 +5,7 @@ - Thesis.File — thesis v0.3.3 + Thesis.File — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.File

diff --git a/doc/Thesis.Notifications.html b/doc/Thesis.Notifications.html index 037e296..d391f97 100644 --- a/doc/Thesis.Notifications.html +++ b/doc/Thesis.Notifications.html @@ -5,7 +5,7 @@ - Thesis.Notifications — thesis v0.3.3 + Thesis.Notifications — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Notifications

@@ -149,16 +149,16 @@

notifications_from_host_app(acc, conn, notifications)

Adds notifications provided by the host app to the accumulator.

-
iex> notifications_from_host_app(%{"page-settings" => []}, nil, [page_settings: ["notif"]])
-%{"page-settings" => ["notif"]}
-iex> notifications_from_host_app(%{"page-settings" => []}, nil, [page_settings: :invalid])
-%{"page-settings" => []}
-iex> notifications_from_host_app(%{"page-settings" => ["notif1"]}, nil, [page_settings: ["notif2"]])
-%{"page-settings" => ["notif2", "notif1"]}
-iex> notifications_from_host_app(%{"other" => [], "add-page" => ["notif"]}, nil, [other: ["notif"]])
-%{"other" => ["notif"], "add-page" => ["notif"]}
-iex> notifications_from_host_app(%{"other" => []}, nil, nil)
-%{"other" => []}
+
iex> notifications_from_host_app(%{"page-settings" => []}, nil, [page_settings: ["notif"]])
+%{"page-settings" => ["notif"]}
+iex> notifications_from_host_app(%{"page-settings" => []}, nil, [page_settings: :invalid])
+%{"page-settings" => []}
+iex> notifications_from_host_app(%{"page-settings" => ["notif1"]}, nil, [page_settings: ["notif2"]])
+%{"page-settings" => ["notif2", "notif1"]}
+iex> notifications_from_host_app(%{"other" => [], "add-page" => ["notif"]}, nil, [other: ["notif"]])
+%{"other" => ["notif"], "add-page" => ["notif"]}
+iex> notifications_from_host_app(%{"other" => []}, nil, nil)
+%{"other" => []}
@@ -193,17 +193,17 @@

verify_notifications_structure(conn, notifications)

Verifies that the notifications provided by the host app are in the correct format.

-
iex> verify_notifications_structure(nil, [:invalid])
+
iex> verify_notifications_structure(nil, [:invalid])
 false
-iex> verify_notifications_structure(nil, %{})
+iex> verify_notifications_structure(nil, %{})
 false
-iex> verify_notifications_structure(nil, %{invalid_key: []})
+iex> verify_notifications_structure(nil, %{invalid_key: []})
 false
-iex> verify_notifications_structure(nil, %{add_page: "invalid value"})
+iex> verify_notifications_structure(nil, %{add_page: "invalid value"})
 false
-iex> verify_notifications_structure(nil, %{add_page: ["notif", "notif", :atom]})
+iex> verify_notifications_structure(nil, %{add_page: ["notif", "notif", :atom]})
 false
-iex> verify_notifications_structure(nil, [add_page: [], page_settings: ["notif"]])
+iex> verify_notifications_structure(nil, [add_page: [], page_settings: ["notif"]])
 false

diff --git a/doc/Thesis.Page.html b/doc/Thesis.Page.html index ac7c7d0..3642bfe 100644 --- a/doc/Thesis.Page.html +++ b/doc/Thesis.Page.html @@ -5,7 +5,7 @@ - Thesis.Page — thesis v0.3.3 + Thesis.Page — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Page

@@ -175,11 +175,11 @@

redirected?(arg1)

Returns whether the page redirects to another page.

Examples:

-
iex> Thesis.Page.redirected?(%Thesis.Page{slug: "", redirect_url: nil})
+
iex> Thesis.Page.redirected?(%Thesis.Page{slug: "", redirect_url: nil})
 false
-iex> Thesis.Page.redirected?(%Thesis.Page{slug: "", redirect_url: ""})
+iex> Thesis.Page.redirected?(%Thesis.Page{slug: "", redirect_url: ""})
 false
-iex> Thesis.Page.redirected?(%Thesis.Page{slug: "", redirect_url: "/asdf"})
+iex> Thesis.Page.redirected?(%Thesis.Page{slug: "", redirect_url: "/asdf"})
 true
diff --git a/doc/Thesis.PageContent.html b/doc/Thesis.PageContent.html index 360f52b..34288c1 100644 --- a/doc/Thesis.PageContent.html +++ b/doc/Thesis.PageContent.html @@ -5,7 +5,7 @@ - Thesis.PageContent — thesis v0.3.3 + Thesis.PageContent — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.PageContent

@@ -190,18 +190,18 @@

find(contents, page_id, name)

Selects the right page content from a list.

-
iex> foo = [%Thesis.PageContent{id: 1, page_id: nil, name: "Test"},%Thesis.PageContent{id: 2, page_id: 1, name: "Test"},%Thesis.PageContent{id: 3, page_id: 2, name: "Test"},%Thesis.PageContent{id: 4, page_id: nil, name: "Test2"},%Thesis.PageContent{id: 5, page_id: 1, name: "Test2"}]
-iex> Thesis.PageContent.find(foo, nil, "Test").id == 1
+
iex> foo = [%Thesis.PageContent{id: 1, page_id: nil, name: "Test"},%Thesis.PageContent{id: 2, page_id: 1, name: "Test"},%Thesis.PageContent{id: 3, page_id: 2, name: "Test"},%Thesis.PageContent{id: 4, page_id: nil, name: "Test2"},%Thesis.PageContent{id: 5, page_id: 1, name: "Test2"}]
+iex> Thesis.PageContent.find(foo, nil, "Test").id == 1
 true
-iex> Thesis.PageContent.find(foo, 1, "Test").id == 2
+iex> Thesis.PageContent.find(foo, 1, "Test").id == 2
 true
-iex> Thesis.PageContent.find(foo, 2, "Test").id == 3
+iex> Thesis.PageContent.find(foo, 2, "Test").id == 3
 true
-iex> Thesis.PageContent.find(foo, nil, "Test2").id == 4
+iex> Thesis.PageContent.find(foo, nil, "Test2").id == 4
 true
-iex> Thesis.PageContent.find(foo, 1, "Test2").id == 5
+iex> Thesis.PageContent.find(foo, 1, "Test2").id == 5
 true
-iex> Thesis.PageContent.find(foo, 1, "Test7")
+iex> Thesis.PageContent.find(foo, 1, "Test7")
 nil
@@ -220,9 +220,9 @@

Doctests:

-
iex> m = %Thesis.PageContent{meta: ~S({"test":"Thing", "test2":"123"})}
-iex> Thesis.PageContent.meta_attributes(m)
-%{test: "Thing", test2: "123"}
+
iex> m = %Thesis.PageContent{meta: ~S({"test":"Thing", "test2":"123"})}
+iex> Thesis.PageContent.meta_attributes(m)
+%{test: "Thing", test2: "123"}
@@ -240,8 +240,8 @@

Doctests:

-
iex> m = %{test: "Thing", test2: "123"}
-iex> Thesis.PageContent.meta_serialize(m)
+
iex> m = %{test: "Thing", test2: "123"}
+iex> Thesis.PageContent.meta_serialize(m)
 ~S({"test2":"123","test":"Thing"})
diff --git a/doc/Thesis.Render.html b/doc/Thesis.Render.html index bdca5be..4bb18ad 100644 --- a/doc/Thesis.Render.html +++ b/doc/Thesis.Render.html @@ -5,7 +5,7 @@ - Thesis.Render — thesis v0.3.3 + Thesis.Render — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Render

diff --git a/doc/Thesis.RepoUploader.html b/doc/Thesis.RepoUploader.html index 5b36ba0..d9b2462 100644 --- a/doc/Thesis.RepoUploader.html +++ b/doc/Thesis.RepoUploader.html @@ -5,7 +5,7 @@ - Thesis.RepoUploader — thesis v0.3.3 + Thesis.RepoUploader — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.RepoUploader

diff --git a/doc/Thesis.Router.html b/doc/Thesis.Router.html index d78df16..1bd5e91 100644 --- a/doc/Thesis.Router.html +++ b/doc/Thesis.Router.html @@ -5,7 +5,7 @@ - Thesis.Router — thesis v0.3.3 + Thesis.Router — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Router

@@ -68,16 +68,16 @@

editor client as well as static assets.

Typically, you'll add this to your web/web.ex file, under the router function:

-
def router do
-  quote do
+
def router do
+  quote do
     use Phoenix.Router
     use Thesis.Router
     # ...
-  end
-end
+
end +end

If you'd prefer, you can remove it from web/web.ex and add it to the router yourself:

-
defmodule MyApp.Router do
+
defmodule MyApp.Router do
   use Thesis.Router
   # ...
diff --git a/doc/Thesis.S3Uploader.html b/doc/Thesis.S3Uploader.html index 09bd190..c6d3f13 100644 --- a/doc/Thesis.S3Uploader.html +++ b/doc/Thesis.S3Uploader.html @@ -5,7 +5,7 @@ - Thesis.S3Uploader — thesis v0.3.3 + Thesis.S3Uploader — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.S3Uploader

diff --git a/doc/Thesis.Store.html b/doc/Thesis.Store.html index dab9e05..85722b8 100644 --- a/doc/Thesis.Store.html +++ b/doc/Thesis.Store.html @@ -5,7 +5,7 @@ - Thesis.Store — thesis v0.3.3 + Thesis.Store — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Store behaviour

@@ -153,7 +153,7 @@

backups(arg0)

Retrieves all backups for a given slug. Returns the backup.

-
backups(slug)
+
backups(slug)
@@ -171,7 +171,7 @@

delete(%{})

Deletes the given page (identified by its slug). Returns {:ok, page} or {:error, changeset}.

-
delete(%{"slug" => "/asdf"})
+
delete(%{"slug" => "/asdf"})

@@ -222,7 +222,7 @@

restore(arg0)

Retrieves a given backup (identified by its id). Returns the backup.

-
restore(backup_id)
+
restore(backup_id)

@@ -241,7 +241,7 @@

update(%{}, map)

Updates the given page (identified by its slug) with the given map of string keys and Thesis.PageContent structs. Returns {:ok, page} or {:error, changeset}.

-
update(%{"slug" => "/"}, %{"Heading" => "My Heading Content"})
+
update(%{"slug" => "/"}, %{"Heading" => "My Heading Content"})

diff --git a/doc/Thesis.Uploader.html b/doc/Thesis.Uploader.html index 91949d3..95cb149 100644 --- a/doc/Thesis.Uploader.html +++ b/doc/Thesis.Uploader.html @@ -5,7 +5,7 @@ - Thesis.Uploader — thesis v0.3.3 + Thesis.Uploader — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Uploader behaviour

diff --git a/doc/Thesis.Utilities.html b/doc/Thesis.Utilities.html index 8f4cd89..b55dedd 100644 --- a/doc/Thesis.Utilities.html +++ b/doc/Thesis.Utilities.html @@ -5,7 +5,7 @@ - Thesis.Utilities — thesis v0.3.3 + Thesis.Utilities — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.Utilities

@@ -144,11 +144,11 @@

normalize_path(path)

Takes a URL and strips unnecessary characters.

iex> import Thesis.Utilities
-iex> normalize_path("//ignite//foo")
+iex> normalize_path("//ignite//foo")
 "/ignite/foo"
-iex> normalize_path("/ignite/foo/")
+iex> normalize_path("/ignite/foo/")
 "/ignite/foo"
-iex> normalize_path("/")
+iex> normalize_path("/")
 "/"
@@ -164,11 +164,11 @@

parameterize(str)

Removes special characters, keeps dashes and underscores, and replaces spaces with dashes. Also downcases the entire string.

iex> import Thesis.Utilities
-iex> parameterize("Jamon is so cool!")
+iex> parameterize("Jamon is so cool!")
 "jamon-is-so-cool"
-iex> parameterize("%#d50SDF dfsJ FDS  lkdsf f dfka   a")
+iex> parameterize("%#d50SDF dfsJ FDS  lkdsf f dfka   a")
 "d50sdf-dfsj-fds--lkdsf-f-dfka---a"
-iex> parameterize(:this_is_a_test)
+iex> parameterize(:this_is_a_test)
 "this-is-a-test"
@@ -183,9 +183,9 @@

random_string(length)

Generates a random string of letters of a given length.

iex> import Thesis.Utilities
-iex> String.length(random_string(15))
+iex> String.length(random_string(15))
 15
-iex> random_string(15) != random_string(15)
+iex> random_string(15) != random_string(15)
 true
@@ -200,11 +200,11 @@

random_string(length, atom)

Generates a random string of digits of a given length.

iex> import Thesis.Utilities
-iex> String.length(random_string(15, :numeric))
+iex> String.length(random_string(15, :numeric))
 15
-iex> random_string(15, :numeric) != random_string(15, :numeric)
+iex> random_string(15, :numeric) != random_string(15, :numeric)
 true
-iex> String.to_integer(random_string(15, :numeric)) > 0
+iex> String.to_integer(random_string(15, :numeric)) > 0
 true
@@ -219,9 +219,9 @@

to_s(arg)

Shorthand to_string.

iex> import Thesis.Utilities
-iex> to_s(000001)
+iex> to_s(000001)
 "1"
-iex> to_s(123)
+iex> to_s(123)
 "123"
@@ -236,9 +236,9 @@

typeof(x)

Returns the data type for the provided data using guard functions.

iex> import Thesis.Utilities
-iex> typeof(000001)
+iex> typeof(000001)
 "integer"
-iex> typeof([1,2,3])
+iex> typeof([1,2,3])
 "list"
diff --git a/doc/Thesis.View.html b/doc/Thesis.View.html index 7bc0f03..386bcfb 100644 --- a/doc/Thesis.View.html +++ b/doc/Thesis.View.html @@ -5,7 +5,7 @@ - Thesis.View — thesis v0.3.3 + Thesis.View — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis.View

@@ -68,15 +68,15 @@

function. Look at individual function documentation to learn more about them.

Typically, you'll add this to your web/web.ex file, under the view function:

-
def view do
-  quote do
+
def view do
+  quote do
     use Thesis.View
     # ...
-  end
-end
+
end +end

If you'd prefer, you can remove it from web/web.ex and add it to your views yourself:

-
defmodule MyApp.MyView do
+
defmodule MyApp.MyView do
   use Thesis.View
   # ...
@@ -182,14 +182,14 @@

Examples

-
<%= content(@conn, "Title", :text, do: "Default Title") %>
-<%= content(@conn, "Description", :html) do %>
+
<%= content(@conn, "Title", :text, do: "Default Title") %>
+<%= content(@conn, "Description", :html) do %>
   <p>Default description</p>
   <p>Another paragraph</p>
-<% end %>
-<%= content(@conn, "Description", :html, classes: "more classes") do %>
+<% end %>
+<%= content(@conn, "Description", :html, classes: "more classes") do %>
   <p>Default description</p>
-<% end %>
+
<% end %>
@@ -222,8 +222,8 @@

current_page(conn)

Returns the current page as a Thesis.Page{} struct.

-
iex> Thesis.View.current_page(%Plug.Conn{request_path: "/test"})
-%Thesis.Page{slug: "/test"}
+
iex> Thesis.View.current_page(%Plug.Conn{request_path: "/test"})
+%Thesis.Page{slug: "/test"}

@@ -249,14 +249,14 @@

Examples

-
<%= global_content(@conn, "Title", :text, do: "Default Title") %>
-<%= global_content(@conn, "Description", :html) do %>
+
<%= global_content(@conn, "Title", :text, do: "Default Title") %>
+<%= global_content(@conn, "Description", :html) do %>
   <p>Default description</p>
   <p>Another paragraph</p>
-<% end %>
-<%= global_content(@conn, "Description", :html, classes: "more classes") do %>
+<% end %>
+<%= global_content(@conn, "Description", :html, classes: "more classes") do %>
   <p>Default description</p>
-<% end %>
+
<% end %>
@@ -286,13 +286,13 @@

page_description(conn, default)

Outputs the page title or a provided default.

Doctests:

-
iex> page = %Thesis.Page{description: "Test Description"}
-iex> conn = %Plug.Conn{assigns: %{thesis_page: page}}
-iex> Thesis.View.page_description(conn, "Default Description")
+
iex> page = %Thesis.Page{description: "Test Description"}
+iex> conn = %Plug.Conn{assigns: %{thesis_page: page}}
+iex> Thesis.View.page_description(conn, "Default Description")
 "Test Description"
-iex> page = %Thesis.Page{}
-iex> conn = %Plug.Conn{assigns: %{thesis_page: page}}
-iex> Thesis.View.page_description(conn, "Default Description")
+iex> page = %Thesis.Page{}
+iex> conn = %Plug.Conn{assigns: %{thesis_page: page}}
+iex> Thesis.View.page_description(conn, "Default Description")
 "Default Description"

@@ -307,13 +307,13 @@

page_title(conn, default)

Outputs the page title or a provided default.

Doctests:

-
iex> page = %Thesis.Page{title: "Test Title"}
-iex> conn = %Plug.Conn{assigns: %{thesis_page: page}}
-iex> Thesis.View.page_title(conn, "Default Title")
+
iex> page = %Thesis.Page{title: "Test Title"}
+iex> conn = %Plug.Conn{assigns: %{thesis_page: page}}
+iex> Thesis.View.page_title(conn, "Default Title")
 "Test Title"
-iex> page = %Thesis.Page{}
-iex> conn = %Plug.Conn{assigns: %{thesis_page: page}}
-iex> Thesis.View.page_title(conn, "Default Title")
+iex> page = %Thesis.Page{}
+iex> conn = %Plug.Conn{assigns: %{thesis_page: page}}
+iex> Thesis.View.page_title(conn, "Default Title")
 "Default Title"
@@ -334,16 +334,16 @@

thesis_editor(conn) current user, and then renders the editor, style tag, and bootstrap js.

If not editable, simply returns an empty string.

Doctests:

-
iex> {:safe, editor} = Thesis.View.thesis_editor(%Plug.Conn{assigns: %{thesis_editable: true}})
-iex> String.contains?(editor, "/thesis/thesis.css")
+
iex> {:safe, editor} = Thesis.View.thesis_editor(%Plug.Conn{assigns: %{thesis_editable: true}})
+iex> String.contains?(editor, "/thesis/thesis.css")
 true
-iex> String.contains?(editor, "thesis-container")
+iex> String.contains?(editor, "thesis-container")
 true
-iex> String.contains?(editor, "<script>")
+iex> String.contains?(editor, "<script>")
 true
 
-iex> Thesis.View.thesis_editor(%Plug.Conn{assigns: %{thesis_editable: false}})
-{:safe, ""}
+
iex> Thesis.View.thesis_editor(%Plug.Conn{assigns: %{thesis_editable: false}}) +{:safe, ""}
diff --git a/doc/Thesis.html b/doc/Thesis.html index efcef4f..30554be 100644 --- a/doc/Thesis.html +++ b/doc/Thesis.html @@ -5,7 +5,7 @@ - Thesis — thesis v0.3.3 + Thesis — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 Thesis

diff --git a/doc/api-reference.html b/doc/api-reference.html index 3bf5fb1..0f02329 100644 --- a/doc/api-reference.html +++ b/doc/api-reference.html @@ -5,7 +5,7 @@ - API Reference — thesis v0.3.3 + API Reference — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

@@ -59,7 +59,7 @@

- thesis v0.3.3 + thesis v0.3.4 API Reference

diff --git a/doc/index.html b/doc/index.html index b7c8bb1..17a3cb9 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,7 +2,7 @@ - thesis v0.3.3 — Documentation + thesis v0.3.4 — Documentation diff --git a/doc/search.html b/doc/search.html index 3bcd401..0039622 100644 --- a/doc/search.html +++ b/doc/search.html @@ -5,7 +5,7 @@ - Search — thesis v0.3.3 + Search — thesis v0.3.4 @@ -29,7 +29,7 @@

thesis

diff --git a/mix.exs b/mix.exs index 12ae90d..dc5ef6c 100644 --- a/mix.exs +++ b/mix.exs @@ -1,6 +1,6 @@ defmodule Thesis.Mixfile do use Mix.Project - @version "0.3.3" # REMEMBER TO UPDATE package.json and both READMEs! + @version "0.3.4" # REMEMBER TO UPDATE package.json and both READMEs! def project do [ diff --git a/package.json b/package.json index 85e8de5..7909db0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "thesis", - "version": "0.3.3", + "version": "0.3.4", "repository": {}, "license": "MIT", "devDependencies": {