- Главная: тихая кнопка «Помахать» (web/js/wave.js), общий счётчик для всех посетителей - server/server.mjs: мини-API (/api/waves, /api/wave), счётчик хранится вне репозитория (/var/lib/vizitka-site/waves.json), лимит раз в секунду с IP, проверка Origin - deploy: systemd-сервис vizitka-api, проксирование /api в nginx, setup-server.sh ставит nodejs - CI: после git pull перезапускает API - Домен https://me.ibrash.duckdns.org вместо заглушки, исправлен пробел в шапке - README и заметки обновлены Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -18,13 +18,13 @@ def head(title, desc, og, depth=1):
|
||||
<meta property="og:locale" content="ru_RU">
|
||||
<meta property="og:title" content="{E(title)}: Аман Ибраш">
|
||||
<meta property="og:description" content="{E(desc)}">
|
||||
<meta property="og:image" content="https://example.com/og/{og}">
|
||||
<meta property="og:image" content="https://me.ibrash.duckdns.org/og/{og}">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{E(title)}: Аман Ибраш">
|
||||
<meta name="twitter:description" content="{E(desc)}">
|
||||
<meta name="twitter:image" content="https://example.com/og/{og}">
|
||||
<meta name="twitter:image" content="https://me.ibrash.duckdns.org/og/{og}">
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
<link rel="preload" href="/fonts/onest-cyrillic-wght-normal.woff2" as="font" type="font/woff2" crossorigin>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
@@ -203,7 +203,7 @@ open(W + 'arch/index.html', 'w').write(idx)
|
||||
sm_path = W + 'sitemap.xml'
|
||||
sm = open(sm_path).read() if os.path.exists(sm_path) else '<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n</urlset>\n'
|
||||
for u in ['/', '/arch/'] + [f"/arch/{c['slug']}/" for c in CASES]:
|
||||
if f'<loc>https://example.com{u}</loc>' not in sm:
|
||||
sm = sm.replace('</urlset>', f' <url><loc>https://example.com{u}</loc></url>\n</urlset>')
|
||||
if f'<loc>https://me.ibrash.duckdns.org{u}</loc>' not in sm:
|
||||
sm = sm.replace('</urlset>', f' <url><loc>https://me.ibrash.duckdns.org{u}</loc></url>\n</urlset>')
|
||||
open(sm_path, 'w').write(sm)
|
||||
print('arch pages:', [c['slug'] for c in CASES])
|
||||
|
||||
Reference in New Issue
Block a user