Last active
March 10, 2020 07:36
-
-
Save zookzook/3e98ab94ec1f670ca4dd0d2b2f353fd3 to your computer and use it in GitHub Desktop.
PageController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule PolarisWeb.PageController do | |
| use PolarisWeb, :controller | |
| alias Polaris.Page | |
| def index(conn, _params) do | |
| %Page{title: title, content: content} = Polaris.Site.index() | |
| conn | |
| |> assign(:page_title, title) | |
| |> assign(:pars, content["pars"]) | |
| |> render("index.html") | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment