add rust, improve code snippet stypes
This commit is contained in:
parent
c116020b4e
commit
370234492a
4 changed files with 26 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -4,7 +4,7 @@ help:
|
||||||
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@docker build -t code.headbright.be/konstantin/iamkonstantin:1.0.16 .
|
@docker build -t code.headbright.be/konstantin/iamkonstantin:1.0.21 .
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
@docker push code.headbright.be/konstantin/iamkonstantin:1.0.16
|
@docker push code.headbright.be/konstantin/iamkonstantin:1.0.21
|
||||||
|
|
22
blog/migrations/0013_alter_blogpage_body.py
Normal file
22
blog/migrations/0013_alter_blogpage_body.py
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Generated by Django 5.0.2 on 2024-03-23 16:56
|
||||||
|
|
||||||
|
import wagtail.blocks
|
||||||
|
import wagtail.embeds.blocks
|
||||||
|
import wagtail.fields
|
||||||
|
import wagtail.images.blocks
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('blog', '0012_blogindexpage_canonical_url_blogindexpage_og_image_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='blogpage',
|
||||||
|
name='body',
|
||||||
|
field=wagtail.fields.StreamField([('heading_block', wagtail.blocks.StructBlock([('heading_text', wagtail.blocks.CharBlock(form_classname='title', required=True)), ('size', wagtail.blocks.ChoiceBlock(blank=True, choices=[('', 'Select a heading size'), ('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], required=False))])), ('paragraph', wagtail.blocks.RichTextBlock(blank=True)), ('code', wagtail.blocks.StructBlock([('language', wagtail.blocks.ChoiceBlock(choices=[('bash', 'Bash/Shell'), ('css', 'CSS'), ('dart', 'Dart'), ('docker', 'Docker'), ('elixir', 'Elixir'), ('go', 'Go'), ('html', 'HTML'), ('javascript', 'Javascript'), ('json', 'JSON'), ('kotlin', 'Kotlin'), ('python', 'Python'), ('rust', 'Rust'), ('swift', 'Swift'), ('toml', 'TOML'), ('yaml', 'YAML')], help_text='Coding language', identifier='language', label='Language')), ('code', wagtail.blocks.TextBlock(identifier='code', label='Code'))], label='Code snippet')), ('image_block', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.blocks.CharBlock(required=False)), ('attribution', wagtail.blocks.CharBlock(required=False))])), ('embed_block', wagtail.embeds.blocks.EmbedBlock(help_text='Insert a URL to embed. For example, https://www.youtube.com/watch?v=SGJFWirQ3ks', icon='media'))], blank=True, help_text='Write anything'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -197,6 +197,7 @@ WAGTAIL_CODE_BLOCK_LANGUAGES = (
|
||||||
('json', 'JSON'),
|
('json', 'JSON'),
|
||||||
('kotlin', 'Kotlin'),
|
('kotlin', 'Kotlin'),
|
||||||
('python', 'Python'),
|
('python', 'Python'),
|
||||||
|
('rust', 'Rust'),
|
||||||
('swift', 'Swift'),
|
('swift', 'Swift'),
|
||||||
('toml', 'TOML'),
|
('toml', 'TOML'),
|
||||||
('yaml', 'YAML'),
|
('yaml', 'YAML'),
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
code[class*="language-"], pre[class*="language-"] {
|
code[class*="language-"], pre[class*="language-"] {
|
||||||
|
white-space: pre-wrap !important;
|
||||||
word-break: break-word !important;
|
word-break: break-word !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue