86 lines
1.4 KiB
Markdown
86 lines
1.4 KiB
Markdown
---
|
|
Title: test
|
|
Subtitle: sub
|
|
Desc: brief desc
|
|
Date: 2023-09-27
|
|
Keywords: main
|
|
foo
|
|
bar
|
|
qux
|
|
Category: Test
|
|
Featured: True
|
|
Public: True
|
|
---
|
|
|
|
# Test article
|
|
----------------------------------------
|
|
This is a crazy testy
|
|
|
|
### toc?
|
|
[TOC]
|
|
|
|
## foo
|
|
|
|
HTML
|
|
|
|
lipsum[^1]
|
|
|
|
<div>INLINE DIV<b>bold</b></div>
|
|
|
|
### bar bar
|
|
|
|
| important | table |
|
|
|-----------|-------|
|
|
| value | 2 |
|
|
| 3 | 4 |
|
|
| 5 | 2 |
|
|
|
|
## foo
|
|
|
|
#### big code
|
|
|
|
```py
|
|
from django.db import models
|
|
from django.utils.translation import gettext as _
|
|
from start.models import Searchable
|
|
|
|
import logging
|
|
logger = logging.getLogger(__name__)
|
|
|
|
import markdown
|
|
ARTICLE_DIR = "/app/blog/data/articles"
|
|
EXTENSIONS = [
|
|
"extra",
|
|
"admonition",
|
|
"codehilite",
|
|
"toc"
|
|
]
|
|
|
|
class Category(models.Model):
|
|
"""
|
|
A category of blog posts
|
|
|
|
Name not translated because it would make i18n in urls and Searchables specifically a pain.
|
|
Maybe some day it would be cool if these were Searchable
|
|
"""
|
|
name= models.CharField(max_length=50)
|
|
slug = models.SlugField()
|
|
|
|
class Meta:
|
|
verbose_name = _("Category")
|
|
verbose_name_plural = _("Categories")
|
|
|
|
def __str__(self):
|
|
return f"{{<{self.__class__.__name__}>\"{self.name}\"}}"
|
|
```
|
|
|
|
### a
|
|
bar
|
|
#### a
|
|
qux
|
|
###### a
|
|
baau
|
|
|
|
*[HTML]: Hyper Text Markup Language
|
|
|
|
[^1]: foooootnote
|