edjroot / phoenix_expug

Expug integration for Phoenix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

phoenix_expug

Phoenix integration for the Expug template engine

Expug is a HTML template engine for indented shorthand, inspired by Pug/Jade, Haml and Slim. This package integrates Expug with Phoenix.

Status

Installation

Add phoenix_expug to your list of dependencies in mix.exs:

def deps do
  [{:phoenix_expug, "~> 0.1.2"}]
end

Add the following to your config/config.exs:

config :phoenix, :template_engines,
  pug: PhoenixExpug.Engine
  lpug: PhoenixExpug.LiveEngine  # For Phoenix LiveView

Add the .pug extension to Phoenix livereload in config/dev.exs:

config :hello_phoenix, HelloPhoenix.Endpoint,
  live_reload: [
    patterns: [
      ~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
      ~r{web/views/.*(ex)$},
      ~r{web/templates/.*(eex|pug)$}
      #                      ^^^^
    ]
  ]

Thanks

phoenix-expug © 2016-2017, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

 

About

Expug integration for Phoenix


Languages

Language:JavaScript 54.8%Language:Elixir 42.3%Language:HTML 2.6%Language:CSS 0.2%