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 sample
- Loading branch information
Showing
5 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
.DS_Store | ||
/bundles | ||
/poshi/poshi-ext.properties | ||
bin | ||
build | ||
dist | ||
node_modules | ||
node_modules_cache | ||
node_modules_cache |
27 changes: 27 additions & 0 deletions
27
...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,27 @@ | ||
import com.vladsch.flexmark.html.HtmlRenderer | ||
import com.vladsch.flexmark.parser.Parser | ||
|
||
buildscript { | ||
dependencies { | ||
classpath group: "com.vladsch.flexmark", name: "flexmark-all", version: "0.64.0" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
task flexmark | ||
|
||
flexmark { | ||
File inputFile = project.file("src/sample.markdown") | ||
inputs.file(inputFile) | ||
|
||
File outputFile = project.file("${project.buildDir}/sample.html") | ||
outputs.file(outputFile) | ||
|
||
doLast { | ||
outputFile.parentFile.mkdirs() | ||
outputFile.text = HtmlRenderer.builder().build().render(Parser.builder().build().parse(inputFile.text)) | ||
} | ||
} |
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 |
14 changes: 14 additions & 0 deletions
14
...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,14 @@ | ||
# 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 |
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