Skip to content

Commit

Permalink
Add wagtailmarkdown. Fixes #123.
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert authored and kesara committed Sep 23, 2021
1 parent 8553682 commit 9e9f552
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ietf/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"django.contrib.admindocs",
"mod_wsgi.server",
"analytical",
"wagtailmarkdown",
)

MIDDLEWARE = [
Expand Down Expand Up @@ -175,6 +176,10 @@
}


WAGTAILMARKDOWN = {
"autodownload_fontawesome": True,
}

# Wagtail settings

WAGTAIL_SITE_NAME = "ietf"
Expand Down
2 changes: 2 additions & 0 deletions ietf/utils/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
from wagtail.contrib.table_block.blocks import TableBlock
from wagtail.images.blocks import ImageChooserBlock
from wagtail.embeds.blocks import EmbedBlock
from wagtailmarkdown.blocks import MarkdownBlock


class StandardBlock(StreamBlock):
heading = CharBlock(icon="title")
paragraph = RichTextBlock(icon="pilcrow")
image = ImageChooserBlock(icon="image", template='includes/imageblock.html')
markdown = MarkdownBlock(icon="code")
embed = EmbedBlock(icon="code")
raw_html = RawHTMLBlock(icon="placeholder")
table = TableBlock(table_options={'renderer': 'html'}, template="includes/tableblock.html")
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"dependencies": {
"@axe-core/puppeteer": "^4.2.2",
"@buzuli/json": "^2.1.0",
"@fortawesome/fontawesome-free": "^5.15.4",
"autoprefixer": "^10.2.6",
"babel-loader": "^8.2.2",
"bootstrap": "^4.6.0",
Expand All @@ -50,11 +51,11 @@
"ionicons": "^2",
"jquery": "^3.6.0",
"jquery-ui": "^1.12.1",
"sass": "^1.35.1",
"normalize.css": "^8.0.1",
"popper.js": "^1.16.1-LTS",
"postcss-normalize": "^10.0.0",
"puppeteer": "^10.1.0",
"sass": "^1.35.1",
"ts-node": "^10.0.0",
"typescript": "^4.3.4"
}
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ django_compressor>=2.2
mod_wsgi>=4.6
django_analytical>=2.5
tqdm>=3.7.0
wagtail-markdown
Pygments

# env var configuration
typed-environment-configuration>=0.1.3,<0.2
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,11 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"

"@fortawesome/fontawesome-free@^5.15.4":
version "5.15.4"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5"
integrity sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==

"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
Expand Down

0 comments on commit 9e9f552

Please sign in to comment.