Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #7

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 45 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
# Render Engine Parsers

The page parser system used for making content for Render Engine
The page parser system used for making content for Render Engine. Parsers are used to parse the content of a page and convert it to HTML. The parser is specified in the page attributes as `Parser`.

Check failure on line 3 in README.md

View workflow job for this annotation

GitHub Actions / build

Line length

README.md:3:81 MD013/line-length Line length [Expected: 80; Actual: 197] https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md

## Parsers
This is meant to be used by Render Enging but can be used as a base dependency for building custom Render Engine Parsers.

Check failure on line 5 in README.md

View workflow job for this annotation

GitHub Actions / build

Line length

README.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 121] https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md

Parsers are used to parse the content of a page and convert it to HTML. The parser is specified in the page attributes as `Parser`.
## Using Frontmatter

The default parser is the `BasePageParser` which processes markdown and passes the content thru as plain text.
[Frontmatter](https://github.com/eyeseast/python-frontmatter) is used to pull in attributes from a generated page.

Check failure on line 9 in README.md

View workflow job for this annotation

GitHub Actions / build

Line length

README.md:9:81 MD013/line-length Line length [Expected: 80; Actual: 114] https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md

Some pages will be looking for information that is provided in the frontmatter. All of the attributes defined can be used in the template (which itself can also be defined in the frontmatter or the class itself.

Check failure on line 11 in README.md

View workflow job for this annotation

GitHub Actions / build

Line length

README.md:11:81 MD013/line-length Line length [Expected: 80; Actual: 211] https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md

> **NOTE**
> These attributes **CANNOT** be used in the content itself, but you can use them in the template generation.

Check failure on line 14 in README.md

View workflow job for this annotation

GitHub Actions / build

Line length

README.md:14:81 MD013/line-length Line length [Expected: 80; Actual: 109] https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md

```md
---
title: "Spider-Man"
name: "Peter Parker"
superhero: "Spider-Man"
---

<h2>I'm your friendly neighborhood Spiderman</h2>

<p>I was bitten by a radioactive spider and now I fight crime.</p>
```

If you generate the page with the following template

```html
<h1>About {{superhero}}</h1>
<h2>Real Name: {{alias}}</h2>

<div>
{{content}}
</div>
```

it would generate.

```html
<h1>About Spider-Man</h1>
<h2>Alias: Peter Parker</h2>

<div>
<h2>I'm your friendly neighborhood Spiderman</h2>

<p>I was bitten by a radioactive spider and now I fight crime.</p>
</div>
```
Loading