forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LPS-179609 add liferay-sample-static-content client extension
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...ces/liferay-sample-workspace/client-extensions/liferay-sample-static-content/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
buildscript { | ||
dependencies { | ||
classpath 'com.vladsch.flexmark:flexmark-all:0.64.0' | ||
} | ||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
task flexmark { | ||
def inputFile = project.file("src/sample.markdown") | ||
def outputFile = project.file("${project.buildDir}/sample.html") | ||
inputs.file(inputFile) | ||
outputs.file(outputFile) | ||
|
||
doLast { | ||
def parser = com.vladsch.flexmark.parser.Parser.builder().build() | ||
def document = parser.parse(inputFile.text) | ||
def renderer = com.vladsch.flexmark.html.HtmlRenderer.builder().build() | ||
outputFile.parentFile.mkdirs() | ||
outputFile.text = renderer.render(document) | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...ay-sample-workspace/client-extensions/liferay-sample-static-content/client-extension.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
assemble: | ||
- fromTask: flexmark | ||
into: static | ||
liferay-sample-static-content: | ||
name: Liferay Sample Static Content | ||
type: staticContent | ||
url: sample.html |
13 changes: 13 additions & 0 deletions
13
...e-workspace/client-extensions/liferay-sample-static-content/src/sample.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Sample Heading | ||
|
||
This is a [link](https://www.liferay.com) to a html document. | ||
|
||
## Sample Second Heading | ||
|
||
- This is a list item | ||
- This is another list item | ||
|
||
### Sample Third Heading | ||
|
||
1. This is a numbered list item | ||
1. This is another numbered list item |