Added quickstart from blag
This commit is contained in:
parent
1c7cc625d5
commit
fba3ddb1a5
19 changed files with 607 additions and 8 deletions
8
content/about.md
Normal file
8
content/about.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
title: About Me
|
||||
description: Short description of this page.
|
||||
|
||||
|
||||
## About Me
|
||||
|
||||
This is a regular page, i.e. not a blog post. Feel free to delete this page,
|
||||
populate it with more content or generate more [pages like this](testpage.md).
|
51
content/hello-world.md
Normal file
51
content/hello-world.md
Normal file
|
@ -0,0 +1,51 @@
|
|||
Title: Hello World!
|
||||
Description: Hello there, this is the first blog post. You should read me first.
|
||||
Date: 2023-01-01 12:00
|
||||
Tags: blag, pygments
|
||||
|
||||
|
||||
## Hello World
|
||||
|
||||
This is an example blog post. Internally, blag differentiates between **pages**
|
||||
and **articles**. Intuitively, pages are simple pages and articles are blog
|
||||
posts. The decision whether a document is a page or an article is made
|
||||
depending on the presence of the `date` metadata element: Any document that
|
||||
contains the `date` metadata element is an article, everything else a page.
|
||||
|
||||
This differentiation has consequences:
|
||||
|
||||
* blag uses different templates: `page.html` and `article.html`
|
||||
* only articles are collected in the Atom feed
|
||||
* only articles are aggregated in the tag pages
|
||||
|
||||
For more detailed information, please refer to the [documentation][doc]
|
||||
|
||||
[doc]: https://blag.readthedocs.io
|
||||
|
||||
|
||||
### Syntax Highlighting
|
||||
|
||||
```python
|
||||
def foo(bar):
|
||||
"""This is a docstring.
|
||||
|
||||
"""
|
||||
# comment
|
||||
return bar
|
||||
```
|
||||
|
||||
Syntax highlighting is done via [Pygments][pygments]. For code blocks, blag
|
||||
generates the necessary CSS classes by default, which you can use to style your
|
||||
code using CSS. It provides you with a default light- and dark theme, for more
|
||||
information on how to generate a different theme, please refer to [Pygments'
|
||||
documentation][pygments].
|
||||
|
||||
[pygments]: https://pygments.org
|
||||
|
||||
|
||||
### Next Steps
|
||||
|
||||
* Adapt the files in `templates` to your needs
|
||||
* Check out the files in `static` and modify as needed
|
||||
* Add some content
|
||||
* Change the [favicon.ico](favicon.ico)
|
11
content/second-post.md
Normal file
11
content/second-post.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
Title: Second Post
|
||||
Description: This is the second blog post, so you can see how it looks like on the front page.
|
||||
Date: 2023-01-02 12:00
|
||||
Tags: blag
|
||||
|
||||
|
||||
## Second Post
|
||||
|
||||
This page serves no purpose :)
|
||||
|
||||

|
46
content/testpage.md
Normal file
46
content/testpage.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
# This Is A Headline
|
||||
|
||||
This is some **bold text** with some `code` inside. This is _some_underlined_
|
||||
text with some `code` inside. This is some text with some `code` inside. This
|
||||
is some text with some `code` inside. This is some text with some `code`
|
||||
inside. This is some text with some `code` inside. This is some text with some
|
||||
`code` inside. This is some text with some `code` inside.
|
||||
|
||||
This is some [link](https://example.com) inside the text -- it does not really
|
||||
lead anywhere! This is some [link](https://example.com) inside the text -- it
|
||||
does not really lead anywhere! This is some [link](https://example.com) inside
|
||||
the text -- it does not really lead anywhere!
|
||||
|
||||
|
||||
* some bullets
|
||||
* some other
|
||||
* bullets
|
||||
* foo
|
||||
|
||||
```python
|
||||
# this is some python code
|
||||
|
||||
class Foo:
|
||||
|
||||
def __init__(self, foo, bar):
|
||||
self.foo = foo
|
||||
self.bar = bar
|
||||
|
||||
def do_something():
|
||||
"""This is the docstring of this method.
|
||||
|
||||
"""
|
||||
return foo
|
||||
```
|
||||
|
||||
|
||||
## Some other headline
|
||||
|
||||
This is some other text
|
||||
|
||||
```makefile
|
||||
|
||||
# some comment
|
||||
foo:
|
||||
ls -lh
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue