Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ All of the behavior for this app is defined in one file (134 line HTML template)
* [The Remake Recipes](https://recipes.remaketheweb.com/) show example Remake code and how it works
* [The Official Demos](https://docs.remaketheweb.com/interactive-demos/) let you play around with Remake code — without installing anything!


## Generate Your Own App! 🎉

To generate it, just run the command `npx remake create myapp`.
Expand Down
1 change: 0 additions & 1 deletion assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ This directory contains all your front-end assets.
* Favicon

E.g. If you include an image called `my-picture.png` in the root of this directory, it will be available at `http://localhost:3000/assets/my-picture.png`

13 changes: 6 additions & 7 deletions layouts/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# Layout templates

* Every template in Remake uses Handlebars to render itself (https://handlebarsjs.com/)
* Every template in Remake gets access to the same template variables (https://docs.remaketheweb.com/templating/), as well as any data that you define in `/app/data/global.json`
* Every template in Remake uses Handlebars to render itself (<https://handlebarsjs.com/>)
* Every template in Remake gets access to the same template variables (<https://docs.remaketheweb.com/templating/>), as well as any data that you define in `/app/data/global.json`

# Tip
## Tip

You don't need to load Remake's front-end JS file if a user can't edit the page. So, if
you create a new layout template, you can use the following code to make sure it's loaded if the page's author is the current user.

```
```html
{{#if isPageAuthor}}
{{!-- Prevent loading the Remake framework if the page isn't editable --}}
<script src="/js/remake-init.js"></script>
{{/if}}
```

# Layouts
## Layouts

In order to use a layout other than the default one, add the following to the top of a page template:

```
```html
{{ layout "layout-name" }}
```