Skip to content

Commit

Permalink
LPS-179609 add liferay-sample-static-content sample
Browse files Browse the repository at this point in the history
  • Loading branch information
gamerson committed Apr 5, 2023
1 parent f6d2bc1 commit 42e0d79
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
3 changes: 1 addition & 2 deletions workspaces/liferay-sample-workspace/.gitignore
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
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))
}
}
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
#jdbc.default.username=root
#jdbc.default.password=

feature.flag.LPS-166479=true
feature.flag.LPS-166479=true

feature.flag.LPS-177027=true

0 comments on commit 42e0d79

Please sign in to comment.