-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional doc for templates and themes #50
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments.
@@ -20,7 +20,6 @@ import com.lightbend.paradox.tree.Tree.{ Forest, Location } | |||
import com.lightbend.paradox.template.PageTemplate | |||
import java.io.File | |||
import java.net.URI | |||
import java.nio.file.{ Path, Paths } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import java.nio.file.{ Path => NioPath , Paths => NioPaths }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably split this commit.
@@ -1,5 +1,4 @@ | |||
Linking | |||
------- | |||
# Linking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change Callouts to H2 instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Maybe because I'm using Pamflet that can generate combined pages and PDF, I think of the whole doc as one big markdown file.
```markdown | ||
## myTitle | ||
``` | ||
and similarly for `=` and `#`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove description of headers. And mention that the first header becomes the title of the page.
@@ -1,5 +1,5 @@ | |||
Snippet inclusion | |||
----------------- | |||
================= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
@@ -1,21 +1,32 @@ | |||
[st]: http://www.stringtemplate.org/ | |||
|
|||
Templating | |||
---------- | |||
========== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
|
||
The `layout` property allows to specify the layout we want to be used for this particular page. The layouts are placed by default in the `target/paradox/theme` folder, but you can create one in `src/main/paradox/_template` folder as a string template file (.st). | ||
The `layout` property allows to specify the template we want to be used for this particular page. The templates are generated by default in paradox in the `target/paradox/theme` folder, but you can create one in `src/main/paradox/_template` folder as a string template file (.st). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change for the first sentence:
The layout of the page is determined by default by a template called page.st
. Using layout
property, we can change the layout template to something else for this particular page.
@@ -43,9 +54,15 @@ layout: templateName | |||
*/ | |||
``` | |||
|
|||
where `templateName` is the name of a template, more precisely the `templateName.st` file, which could either be a predefined template, or a created one in the `src/main/paradox/_template` folder. | |||
where `templateName` is the name of a template, more precisely the `templateName.st` file, which could either be a predefined template, or a created one in the `src/main/paradox/_template` folder. The default templates generated by paradox depends on the theme used, see [this](themes.md) for more info about themes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use @ref
?
Theming | ||
======= | ||
|
||
Paradox uses "theming" to generate its target files. Combined with templates within it, themes can produce a global styling of the site generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A theme is a collection of templates and other resources like css and image files that can be distributed as a web jar. Using this mechanism, multiple Paradox sites can have consistent look and feel.
*/ | ||
``` | ||
|
||
## How to use themes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this section, just explain how to use external themes or local templates.
``` | ||
|
||
considering you have previously created a template with the name `myDefault.st` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here make a new section for creating a new theme.
Indicate how to deal with templates and themes and what are the possibilities with them.