Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Pug templates for Elixir

NotificationsYou must be signed in to change notification settings

rstacruz/expug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expug

Indented shorthand HTML templates for Elixir

Expug is a template language based onPug (formerly known asJade).It lets you write HTML as indented shorthand, inspired by Haml, Slim, Pug/Jade, and so on.

<iframe src='https://try-expug.herokuapp.com/try?code=doctype%20html%0Ahtml%0A%20%20head%0A%20%20%20%20meta(charset%3D%22utf-8%22)%0A%20%20%20%20title%20Hello%0A%20%20body%0A%20%20%20%20a.button(href%3D%40link)%0A%20%20%20%20%20%20%7C%20This%20is%20a%20link' height='400' width='100%' style='border: 0'></iframe>
doctype htmlhtml  meta(charset="utf-8")  title Hello, world!body  a(href=@link)    | This is a link

Installation

Add expug to your list of dependencies inmix.exs:

defdepsdo[{:expug,"~> 0.9"}]end

Also seephoenix_expug for Phoenix integration.

Syntax

Use CSS-like selectors for elements, and express your nesting through indentations.

ul.links  li    a(href="/") This is a link

Read more:Syntax

Why should I use it?

Read onthis comparison to see how Expug compares to other similar libraries.

Thanks

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

ricostacruz.com  · GitHub@rstacruz  · Twitter@rstacruz

 


[8]ページ先頭

©2009-2025 Movatter.jp