old_contents: import json
  import logging.config
  import os
  import sys
  
  from flask import Flask
  import jinja2
  
  from content.util import htmlmin_filter, gh_markdown
  from content import static_serve
  from pushbullet import PushBullet
  
  __all__ = ["app", "config"]
  
  os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
  logging.config.dictConfig({
      "version": 1,
      "formatters": {
          "brief": {
              "format": "[%(asctime)s][%(levelname)s] %(message)s",
              "datefmt": "%H:%M:%S"
          },
          "full": {
              "format": "[%(asctime)s][%(levelname)s] %(message)s",
              "datefmt": "%Y-%m-%d][%H:%M:%S"
          }
      },
      "handlers": {
          "console": {
              "class": "logging.StreamHandler",
              "formatter": "brief",
              "level": "WARNING",
              "stream": "ext://sys.stderr"
          },
          "file": {
              "class": "logging.FileHandler",
              "formatter": "full",
              "level": "DEBUG",
              "filename": "debug.log"
          }
      },
      "root": {
          "level": "DEBUG",
          "handlers": ["console", "file"]
      }
  })
  
  
  def get_config():
      config_path = os.path.abspath("config.json")
      if os.path.isfile(config_path):
          with open(config_path) as config_file:
              return json.load(config_file)
      else:
          logging.warning("Config not found! Please copy config.default.json to config.json")
          sys.exit()
  
  
  config = get_config()
  
  app = Flask(__name__, static_url_path='')
  
  app.jinja_loader = jinja2.FileSystemLoader([
      os.path.abspath(os.path.join(app.root_path, "templates")),
      os.path.abspath(os.path.join(os.path.curdir, "static-templates")),
  ])
  
  push = PushBullet(config["pushbullet"]["api-key"])
  
  # Register filters
  htmlmin_filter.register(app)
  gh_markdown.register(app)
  # Register webpages
  static_serve.register(app)
  from content import web_api_pages, documentation_serve, documentation_update, error_handlers, minecraft_api
  
new_contents: import json
  import logging.config
  import os
  import sys
  
  from flask import Flask
  import jinja2
  
  from content.util import htmlmin_filter, gh_markdown
  from content import static_serve
  from pushbullet import PushBullet
  
  __all__ = ["app", "config"]
  
  os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
  logging.config.dictConfig({
      "version": 1,
      "formatters": {
          "brief": {
              "format": "[%(asctime)s][%(levelname)s] %(message)s",
              "datefmt": "%H:%M:%S"
          },
          "full": {
              "format": "[%(asctime)s][%(levelname)s] %(message)s",
              "datefmt": "%Y-%m-%d][%H:%M:%S"
          }
      },
      "handlers": {
          "console": {
              "class": "logging.StreamHandler",
              "formatter": "brief",
              "level": "WARNING",
              "stream": "ext://sys.stderr"
          },
          "file": {
              "class": "logging.FileHandler",
              "formatter": "full",
              "level": "DEBUG",
              "filename": "debug.log"
          }
      },
      "root": {
          "level": "DEBUG",
          "handlers": ["console", "file"]
      }
  })
  
  
  def get_config():
      config_path = os.path.abspath("config.json")
      if os.path.isfile(config_path):
          with open(config_path) as config_file:
              return json.load(config_file)
      else:
          logging.warning("Config not found! Please copy config.default.json to config.json")
          sys.exit()
  
  
  config = get_config()
  
  app = Flask(__name__, static_url_path='')
  
  app.jinja_loader = jinja2.FileSystemLoader([
      os.path.abspath(os.path.join(app.root_path, "templates")),
      os.path.abspath(os.path.abspath("static-templates")),
  ])
  
  push = PushBullet(config["pushbullet"]["api-key"])
  
  # Register filters
  htmlmin_filter.register(app)
  gh_markdown.register(app)
  # Register webpages
  static_serve.register(app)
  from content import web_api_pages, documentation_serve, documentation_update, error_handlers, minecraft_api
  
subject: Use more useful os.path.abspath('static-templates') instead of os.path.join(os.path.curdur, 'static-templates')