From 0133f9c6d87d07837e4f4df57666b7301c632756 Mon Sep 17 00:00:00 2001 From: Alexandre Marcondes Date: Thu, 3 Aug 2023 12:11:33 +0200 Subject: [PATCH] Doc linting --- README.md | 1 - assets/README.md | 1 - layouts/README.md | 13 ++++++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f99669f..c66e5c7 100644 --- a/README.md +++ b/README.md @@ -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`. diff --git a/assets/README.md b/assets/README.md index 84c1756..becedea 100644 --- a/assets/README.md +++ b/assets/README.md @@ -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` - diff --git a/layouts/README.md b/layouts/README.md index 6d4e3ba..cfb6ce3 100644 --- a/layouts/README.md +++ b/layouts/README.md @@ -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 () +* Every template in Remake gets access to the same template variables (), 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 --}} {{/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" }} ``` -