Initial commit
This commit is contained in:
commit
f30215ffe9
34
.devcontainer/devcontainer.json
Normal file
34
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
||||||
|
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/docker-existing-dockerfile
|
||||||
|
{
|
||||||
|
"name": "Existing Dockerfile",
|
||||||
|
|
||||||
|
// Sets the run context to one level up instead of the .devcontainer folder.
|
||||||
|
"context": "..",
|
||||||
|
|
||||||
|
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
|
||||||
|
"dockerFile": "../Dockerfile",
|
||||||
|
|
||||||
|
// Set *default* container specific settings.json values on container create.
|
||||||
|
"settings": {
|
||||||
|
"terminal.integrated.shell.linux": null
|
||||||
|
},
|
||||||
|
|
||||||
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
|
"extensions": []
|
||||||
|
|
||||||
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
// "forwardPorts": [],
|
||||||
|
|
||||||
|
// Uncomment the next line to run commands after the container is created - for example installing curl.
|
||||||
|
// "postCreateCommand": "apt-get update && apt-get install -y curl",
|
||||||
|
|
||||||
|
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
|
||||||
|
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
|
||||||
|
|
||||||
|
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
|
||||||
|
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
|
||||||
|
|
||||||
|
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
|
||||||
|
// "remoteUser": "vscode"
|
||||||
|
}
|
||||||
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM python:3.8
|
||||||
|
|
||||||
|
RUN pip3 install pipenv gunicorn
|
||||||
|
|
||||||
|
ENV PROJECT_DIR /usr/src/simpleblogapi
|
||||||
|
|
||||||
|
WORKDIR ${PROJECT_DIR}
|
||||||
|
|
||||||
|
COPY Pipfile .
|
||||||
|
COPY Pipfile.lock .
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN pipenv install --deploy --ignore-pipfile
|
||||||
|
|
||||||
|
EXPOSE 5400
|
||||||
|
|
||||||
|
CMD ["gunicorn", "-c", "gunicorn_config.py", "wsgi:api"]
|
||||||
25
Pipfile
Normal file
25
Pipfile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
[[source]]
|
||||||
|
url = "https://pypi.python.org/simple"
|
||||||
|
verify_ssl = true
|
||||||
|
name = "pypi"
|
||||||
|
|
||||||
|
[packages]
|
||||||
|
aniso8601 = "==9.0.1"
|
||||||
|
beautifulsoup4 = "==4.9.3"
|
||||||
|
click = "==8.0.1"
|
||||||
|
Flask = "==2.0.1"
|
||||||
|
Flask-RESTful = "==0.3.9"
|
||||||
|
gunicorn = "==20.1.0"
|
||||||
|
itsdangerous = "==2.0.1"
|
||||||
|
Jinja2 = "==3.0.1"
|
||||||
|
Markdown = "==3.3.4"
|
||||||
|
MarkupSafe = "==2.0.1"
|
||||||
|
pytz = "==2021.1"
|
||||||
|
six = "==1.16.0"
|
||||||
|
soupsieve = "==2.2.1"
|
||||||
|
Werkzeug = "==2.0.1"
|
||||||
|
|
||||||
|
[dev-packages]
|
||||||
|
|
||||||
|
[requires]
|
||||||
|
python_version = "3.8"
|
||||||
167
Pipfile.lock
generated
Normal file
167
Pipfile.lock
generated
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
{
|
||||||
|
"_meta": {
|
||||||
|
"hash": {
|
||||||
|
"sha256": "1f2f1fa75a1a8db97c488933c428682f572753a70537fad42a0ee1f69c73927c"
|
||||||
|
},
|
||||||
|
"pipfile-spec": 6,
|
||||||
|
"requires": {
|
||||||
|
"python_version": "3.8"
|
||||||
|
},
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"name": "pypi",
|
||||||
|
"url": "https://pypi.python.org/simple",
|
||||||
|
"verify_ssl": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"aniso8601": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:1d2b7ef82963909e93c4f24ce48d4de9e66009a21bf1c1e1c85bdd0812fe412f",
|
||||||
|
"sha256:72e3117667eedf66951bb2d93f4296a56b94b078a8a95905a052611fb3f1b973"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==9.0.1"
|
||||||
|
},
|
||||||
|
"beautifulsoup4": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:4c98143716ef1cb40bf7f39a8e3eec8f8b009509e74904ba3a7b315431577e35",
|
||||||
|
"sha256:84729e322ad1d5b4d25f805bfa05b902dd96450f43842c4e99067d5e1369eb25",
|
||||||
|
"sha256:fff47e031e34ec82bf17e00da8f592fe7de69aeea38be00523c04623c04fb666"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==4.9.3"
|
||||||
|
},
|
||||||
|
"click": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a",
|
||||||
|
"sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==8.0.1"
|
||||||
|
},
|
||||||
|
"flask": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:1c4c257b1892aec1398784c63791cbaa43062f1f7aeb555c4da961b20ee68f55",
|
||||||
|
"sha256:a6209ca15eb63fc9385f38e452704113d679511d9574d09b2cf9183ae7d20dc9"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==2.0.1"
|
||||||
|
},
|
||||||
|
"flask-restful": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:4970c49b6488e46c520b325f54833374dc2b98e211f1b272bd4b0c516232afe2",
|
||||||
|
"sha256:ccec650b835d48192138c85329ae03735e6ced58e9b2d9c2146d6c84c06fa53e"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==0.3.9"
|
||||||
|
},
|
||||||
|
"gunicorn": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e",
|
||||||
|
"sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==20.1.0"
|
||||||
|
},
|
||||||
|
"itsdangerous": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:5174094b9637652bdb841a3029700391451bd092ba3db90600dea710ba28e97c",
|
||||||
|
"sha256:9e724d68fc22902a1435351f84c3fb8623f303fffcc566a4cb952df8c572cff0"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==2.0.1"
|
||||||
|
},
|
||||||
|
"jinja2": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4",
|
||||||
|
"sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==3.0.1"
|
||||||
|
},
|
||||||
|
"markdown": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49",
|
||||||
|
"sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==3.3.4"
|
||||||
|
},
|
||||||
|
"markupsafe": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298",
|
||||||
|
"sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64",
|
||||||
|
"sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b",
|
||||||
|
"sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567",
|
||||||
|
"sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff",
|
||||||
|
"sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74",
|
||||||
|
"sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35",
|
||||||
|
"sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26",
|
||||||
|
"sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7",
|
||||||
|
"sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75",
|
||||||
|
"sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f",
|
||||||
|
"sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135",
|
||||||
|
"sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8",
|
||||||
|
"sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a",
|
||||||
|
"sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914",
|
||||||
|
"sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18",
|
||||||
|
"sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8",
|
||||||
|
"sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2",
|
||||||
|
"sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d",
|
||||||
|
"sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b",
|
||||||
|
"sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f",
|
||||||
|
"sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb",
|
||||||
|
"sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833",
|
||||||
|
"sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415",
|
||||||
|
"sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902",
|
||||||
|
"sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9",
|
||||||
|
"sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d",
|
||||||
|
"sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066",
|
||||||
|
"sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f",
|
||||||
|
"sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5",
|
||||||
|
"sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94",
|
||||||
|
"sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509",
|
||||||
|
"sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51",
|
||||||
|
"sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==2.0.1"
|
||||||
|
},
|
||||||
|
"pytz": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da",
|
||||||
|
"sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==2021.1"
|
||||||
|
},
|
||||||
|
"six": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
|
||||||
|
"sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==1.16.0"
|
||||||
|
},
|
||||||
|
"soupsieve": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:052774848f448cf19c7e959adf5566904d525f33a3f8b6ba6f6f8f26ec7de0cc",
|
||||||
|
"sha256:c2c1c2d44f158cdbddab7824a9af8c4f83c76b1e23e049479aa432feb6c4c23b"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"markers": "python_version >= '3.0'",
|
||||||
|
"version": "==2.2.1"
|
||||||
|
},
|
||||||
|
"werkzeug": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:1de1db30d010ff1af14a009224ec49ab2329ad2cde454c8a708130642d579c42",
|
||||||
|
"sha256:6c1ec500dcdba0baa27600f6a22f6333d8b662d22027ff9f6202e3367413caa8"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"develop": {}
|
||||||
|
}
|
||||||
BIN
__pycache__/app.cpython-38.pyc
Normal file
BIN
__pycache__/app.cpython-38.pyc
Normal file
Binary file not shown.
BIN
__pycache__/gunicorn_config.cpython-38.pyc
Normal file
BIN
__pycache__/gunicorn_config.cpython-38.pyc
Normal file
Binary file not shown.
BIN
__pycache__/main.cpython-38.pyc
Normal file
BIN
__pycache__/main.cpython-38.pyc
Normal file
Binary file not shown.
BIN
__pycache__/wsgi.cpython-38.pyc
Normal file
BIN
__pycache__/wsgi.cpython-38.pyc
Normal file
Binary file not shown.
101
app.py
Normal file
101
app.py
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
from bs4 import BeautifulSoup
|
||||||
|
from markdown import markdown
|
||||||
|
from flask import Flask
|
||||||
|
from flask_restful import Api, Resource, reqparse
|
||||||
|
import random
|
||||||
|
import os
|
||||||
|
|
||||||
|
class Post(Resource):
|
||||||
|
|
||||||
|
def get(self, slug=""):
|
||||||
|
|
||||||
|
path = "./posts"
|
||||||
|
files = os.listdir(path)
|
||||||
|
|
||||||
|
# general file name format will be:
|
||||||
|
# <iso date>_<category>_<slug>.md
|
||||||
|
# eg 2021-06-02_projects_my-kubernetes-cluster.md
|
||||||
|
|
||||||
|
if slug == "":
|
||||||
|
_file = random.choice(files)
|
||||||
|
tokens = _file.split('_')
|
||||||
|
|
||||||
|
_date = tokens[0]
|
||||||
|
_category = tokens[1]
|
||||||
|
_slug = tokens[2].replace('.md', '')
|
||||||
|
|
||||||
|
_post = {
|
||||||
|
"slug": _slug,
|
||||||
|
"date": _date,
|
||||||
|
"category": _category,
|
||||||
|
"content": render(open(path+'/'+_file, 'r').read())
|
||||||
|
}
|
||||||
|
return _post, 200
|
||||||
|
|
||||||
|
for _file in files:
|
||||||
|
tokens = _file.split('_')
|
||||||
|
|
||||||
|
_date = tokens[0]
|
||||||
|
_category = tokens[1]
|
||||||
|
_slug = tokens[2].replace('.md', '')
|
||||||
|
|
||||||
|
if(_slug == slug):
|
||||||
|
_post = {
|
||||||
|
"slug": _slug,
|
||||||
|
"date": _date,
|
||||||
|
"category": _category,
|
||||||
|
"content": render(open(path+'/'+_file, 'r').read())
|
||||||
|
}
|
||||||
|
return _post, 200
|
||||||
|
|
||||||
|
return "Post not found", 400
|
||||||
|
|
||||||
|
class Posts(Resource):
|
||||||
|
|
||||||
|
def get(self, slug=""):
|
||||||
|
|
||||||
|
path = "./posts"
|
||||||
|
files = os.listdir(path)
|
||||||
|
posts = []
|
||||||
|
|
||||||
|
# general file name format will be:
|
||||||
|
# <iso date>_<category>_<slug>.md
|
||||||
|
# eg 2021-06-02_projects_my-kubernetes-cluster.md
|
||||||
|
|
||||||
|
for _file in files:
|
||||||
|
tokens = _file.split('_')
|
||||||
|
|
||||||
|
_date = tokens[0]
|
||||||
|
_category = tokens[1]
|
||||||
|
_slug = tokens[2].replace('.md', '')
|
||||||
|
|
||||||
|
_post = {
|
||||||
|
"slug": _slug,
|
||||||
|
"date": _date,
|
||||||
|
"category": _category,
|
||||||
|
"content": render(open(path+'/'+_file, 'r').read())
|
||||||
|
}
|
||||||
|
|
||||||
|
posts.append(_post)
|
||||||
|
|
||||||
|
return posts, 200
|
||||||
|
|
||||||
|
|
||||||
|
def render(content):
|
||||||
|
"""Render Markdown Syntax to final HTML."""
|
||||||
|
soup = BeautifulSoup(markdown(content, extensions=['codehilite']), features="html.parser")
|
||||||
|
_add_a_attrs(soup)
|
||||||
|
return soup.decode()
|
||||||
|
|
||||||
|
def _add_a_attrs(soup):
|
||||||
|
"""Add HTML attrs to our link elements"""
|
||||||
|
for tag in soup.find_all("a"):
|
||||||
|
tag['rel'] = "nofollow"
|
||||||
|
tag['target'] = "_blank"
|
||||||
|
|
||||||
|
|
||||||
|
api = Flask(__name__)
|
||||||
|
_api = Api(api)
|
||||||
|
|
||||||
|
_api.add_resource(Post, "/post/<string:slug>")
|
||||||
|
_api.add_resource(Posts, "/posts")
|
||||||
74
codehilite_styles.css
Normal file
74
codehilite_styles.css
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
pre { line-height: 125%; }
|
||||||
|
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
|
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
|
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
|
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
|
.codehilite .hll { background-color: #ffffcc }
|
||||||
|
.codehilite { background: #f8f8f8; }
|
||||||
|
.codehilite .c { color: #408080; font-style: italic } /* Comment */
|
||||||
|
.codehilite .err { border: 1px solid #FF0000 } /* Error */
|
||||||
|
.codehilite .k { color: #008000; font-weight: bold } /* Keyword */
|
||||||
|
.codehilite .o { color: #666666 } /* Operator */
|
||||||
|
.codehilite .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
|
||||||
|
.codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */
|
||||||
|
.codehilite .cp { color: #BC7A00 } /* Comment.Preproc */
|
||||||
|
.codehilite .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
|
||||||
|
.codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */
|
||||||
|
.codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */
|
||||||
|
.codehilite .gd { color: #A00000 } /* Generic.Deleted */
|
||||||
|
.codehilite .ge { font-style: italic } /* Generic.Emph */
|
||||||
|
.codehilite .gr { color: #FF0000 } /* Generic.Error */
|
||||||
|
.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||||
|
.codehilite .gi { color: #00A000 } /* Generic.Inserted */
|
||||||
|
.codehilite .go { color: #888888 } /* Generic.Output */
|
||||||
|
.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
|
||||||
|
.codehilite .gs { font-weight: bold } /* Generic.Strong */
|
||||||
|
.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||||
|
.codehilite .gt { color: #0044DD } /* Generic.Traceback */
|
||||||
|
.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
|
||||||
|
.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
|
||||||
|
.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
|
||||||
|
.codehilite .kp { color: #008000 } /* Keyword.Pseudo */
|
||||||
|
.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
|
||||||
|
.codehilite .kt { color: #B00040 } /* Keyword.Type */
|
||||||
|
.codehilite .m { color: #666666 } /* Literal.Number */
|
||||||
|
.codehilite .s { color: #BA2121 } /* Literal.String */
|
||||||
|
.codehilite .na { color: #7D9029 } /* Name.Attribute */
|
||||||
|
.codehilite .nb { color: #008000 } /* Name.Builtin */
|
||||||
|
.codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */
|
||||||
|
.codehilite .no { color: #880000 } /* Name.Constant */
|
||||||
|
.codehilite .nd { color: #AA22FF } /* Name.Decorator */
|
||||||
|
.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */
|
||||||
|
.codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
|
||||||
|
.codehilite .nf { color: #0000FF } /* Name.Function */
|
||||||
|
.codehilite .nl { color: #A0A000 } /* Name.Label */
|
||||||
|
.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
|
||||||
|
.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
|
||||||
|
.codehilite .nv { color: #19177C } /* Name.Variable */
|
||||||
|
.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
|
||||||
|
.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
|
||||||
|
.codehilite .mb { color: #666666 } /* Literal.Number.Bin */
|
||||||
|
.codehilite .mf { color: #666666 } /* Literal.Number.Float */
|
||||||
|
.codehilite .mh { color: #666666 } /* Literal.Number.Hex */
|
||||||
|
.codehilite .mi { color: #666666 } /* Literal.Number.Integer */
|
||||||
|
.codehilite .mo { color: #666666 } /* Literal.Number.Oct */
|
||||||
|
.codehilite .sa { color: #BA2121 } /* Literal.String.Affix */
|
||||||
|
.codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
|
||||||
|
.codehilite .sc { color: #BA2121 } /* Literal.String.Char */
|
||||||
|
.codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */
|
||||||
|
.codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
||||||
|
.codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
|
||||||
|
.codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
|
||||||
|
.codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
|
||||||
|
.codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
|
||||||
|
.codehilite .sx { color: #008000 } /* Literal.String.Other */
|
||||||
|
.codehilite .sr { color: #BB6688 } /* Literal.String.Regex */
|
||||||
|
.codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
|
||||||
|
.codehilite .ss { color: #19177C } /* Literal.String.Symbol */
|
||||||
|
.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
|
||||||
|
.codehilite .fm { color: #0000FF } /* Name.Function.Magic */
|
||||||
|
.codehilite .vc { color: #19177C } /* Name.Variable.Class */
|
||||||
|
.codehilite .vg { color: #19177C } /* Name.Variable.Global */
|
||||||
|
.codehilite .vi { color: #19177C } /* Name.Variable.Instance */
|
||||||
|
.codehilite .vm { color: #19177C } /* Name.Variable.Magic */
|
||||||
|
.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
|
||||||
4
gunicorn_config.py
Normal file
4
gunicorn_config.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# to run: gunicorn -c gunicorn_config.py wsgi:api
|
||||||
|
|
||||||
|
bind = "0.0.0.0:5400"
|
||||||
|
workers = 2
|
||||||
15
posts/2021-06-02_uncategorised_example-copy.md
Normal file
15
posts/2021-06-02_uncategorised_example-copy.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
## Test Ground
|
||||||
|
|
||||||
|
This is an example of rendering a page of mostly styled html from markdown
|
||||||
|
|
||||||
|
I'm *hoping* that this works.
|
||||||
|
|
||||||
|
|
||||||
|
#!python
|
||||||
|
# Some python script would look like this
|
||||||
|
print("hello world.")
|
||||||
|
|
||||||
|
|
||||||
|
You can also have code inline like `this`.
|
||||||
|
|
||||||
|
[Here](https://www.example.com) is a link for good measure.
|
||||||
15
posts/2021-06-02_uncategorised_example.md
Normal file
15
posts/2021-06-02_uncategorised_example.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
## Test Ground
|
||||||
|
|
||||||
|
This is an example of rendering a page of mostly styled html from markdown
|
||||||
|
|
||||||
|
I'm *hoping* that this works.
|
||||||
|
|
||||||
|
|
||||||
|
#!python
|
||||||
|
# Some python script would look like this
|
||||||
|
print("hello world.")
|
||||||
|
|
||||||
|
|
||||||
|
You can also have code inline like `this`.
|
||||||
|
|
||||||
|
[Here](https://www.example.com) is a link for good measure.
|
||||||
14
requirements.txt
Normal file
14
requirements.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
aniso8601==9.0.1
|
||||||
|
beautifulsoup4==4.9.3
|
||||||
|
click==8.0.1
|
||||||
|
Flask==2.0.1
|
||||||
|
Flask-RESTful==0.3.9
|
||||||
|
gunicorn==20.1.0
|
||||||
|
itsdangerous==2.0.1
|
||||||
|
Jinja2==3.0.1
|
||||||
|
Markdown==3.3.4
|
||||||
|
MarkupSafe==2.0.1
|
||||||
|
pytz==2021.1
|
||||||
|
six==1.16.0
|
||||||
|
soupsieve==2.2.1
|
||||||
|
Werkzeug==2.0.1
|
||||||
Reference in New Issue
Block a user