Merge pull request #84 from fabrixxm/me

Add favicon, "alsoKnownAs" support, show all options in me.sample.yml
This commit is contained in:
Thomas Sileo
2020-07-01 09:30:51 +02:00
committed by GitHub
4 changed files with 21 additions and 2 deletions

View File

@@ -67,11 +67,14 @@ with open(os.path.join(KEY_DIR, "me.yml")) as f:
ID = BASE_URL
SUMMARY = conf["summary"]
ICON_URL = conf["icon_url"]
FAVICON_URL = conf.get("favicon_url", "/static/favicon.png")
PASS = conf["pass"]
PROFILE_METADATA = conf.get("profile_metadata", {})
HIDE_FOLLOWING = conf.get("hide_following", True)
ALIASES = conf.get('aliases', [])
# Theme-related config
theme_conf = conf.get("theme", {})
THEME_STYLE = ThemeStyle(theme_conf.get("style", DEFAULT_THEME_STYLE))
@@ -161,6 +164,7 @@ ME = {
"url": ICON_URL,
},
"publicKey": KEY.to_dict(),
"alsoKnownAs": ALIASES,
}
# Default emojis, space-separated, update `me.yml` to customize emojis

View File

@@ -1,6 +1,20 @@
username: 'username'
name: 'You Name'
icon_url: 'https://you-avatar-url'
domain: 'your-domain.tld'
summary: 'your summary'
https: true
summary: 'your summary'
icon_url: 'https://you-avatar-url'
pass: '<bcrypt password hash>'
#favicon_url: '/static/favicon.png'
#profile_metadata:
# name1: 'value'
# name2: 'value2'
#hide_following: true
#manually_approves_followers: false
#aliases:
# - "http://example.com/users/name"
# - ...
#theme:
# style: "light" #or "dark"
# color: "#1d781d" # (green, default for light)
# "#33ff00" (purple, default for dark)

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

View File

@@ -5,6 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{% block title %}{{ config.NAME }}'s microblog{% endblock %}</title>
<link rel="icon" type="image/png" href="{{ config.FAVICON_URL }}">
<link rel="stylesheet" href="/static/pure.css">
<link rel="authorization_endpoint" href="{{ config.ID }}/indieauth">
<link rel="token_endpoint" href="{{ config.ID }}/token">