Skip to content

Commit

Permalink
LPS-179609 add liferay-sample-static-content client extension
Browse files Browse the repository at this point in the history
  • Loading branch information
gamerson committed Mar 28, 2023
1 parent c54baa6 commit 85d5083
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
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)
}
}
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,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

0 comments on commit 85d5083

Please sign in to comment.