From 38f9ca6fd33fa3089dd15f6c9ce854420b2fe3e0 Mon Sep 17 00:00:00 2001 From: Oladoyinbo Vincent <73993087+oladoyinbov@users.noreply.github.com> Date: Wed, 8 Nov 2023 22:02:46 +0100 Subject: [PATCH] Update README.md --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b1400d4..48489b2 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ print $html -> toHtml(); In order to achieve this, you need to create a folder to store the compiled markdown files. -> ➡️ If we've already set up directories named `files` and `markdowns` with a file named `hello.md` in the `markdowns` directory, let's see how we can convert the `hello.md` markdown file into an HTML file. Afterward, we will save the resulting HTML output in a new file named `hello.html` in `files` directory: +> ➡️ If we've already set up directories named `pages` and `markdowns` with a file named `hello.md` in the `markdowns` directory, let's see how we can convert the `hello.md` markdown file into an HTML file. Afterward, we will save the resulting HTML output in a new file named `hello.html` in `pages` directory:
> **file:** markdowns/hello.md @@ -83,14 +83,24 @@ use FastVolt\Helper\Markdown; # convert md file to html file $markdown = Markdown::new() - -> setFile(' files/hello.md ') + -> setFile( __DIR__ . '/files/hello.md' ) -> setCompileDir( 'pages/' ) - -> toHtmlFile(); + -> toHtmlFile( filename: 'hello' ); # check if markdown compile to html successfully if ($markdown) { print ("compile successful"); -} +} + +``` + +After above operation, you will get the following result: + +> **file:** pages/hello.html + +```html + +

hello

``` @@ -100,7 +110,7 @@ if ($markdown) { - that's all 😇. -# Note +## Note FastVolt is an extended/simplified version of Erusev's ParseDown Library.