Refactor: полный переход на Python + Markdown, удаление Hugo

This commit is contained in:
Roman 2026-07-22 09:48:58 +03:00
parent 228f3fed61
commit e09059c2e5
15 changed files with 55 additions and 47 deletions

3
go.mod
View File

@ -1,3 +0,0 @@
module pmi.komisc.ru
go 1.22.2

View File

@ -1,3 +0,0 @@
baseURL = 'https://pmi.komisc.ru/'
languageCode = 'en-us'
title = 'Институт физики и математики'

View File

@ -1,38 +0,0 @@
title: "Институт физики и математики"
baseURL: "https://pmi.komisc.ru/"
languageCode: ru
module:
imports:
- path: github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify
- path: github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-reveal
- path: github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5
theme: hugo-blox-builder
enableRobotsTXT: true
params:
math:
enable: true # поддержка LaTeX-формул
description: "Официальный сайт Института"
menu:
main:
- name: Главная
url: /
weight: 1
- name: Сотрудники
url: /authors/
weight: 2
- name: Новости
url: /post/
weight: 3
- name: Наука
url: /research/
weight: 4
- name: Контакты
url: /contact/
weight: 5
markup:
goldmark:
renderer:
unsafe: true # нужно для рендеринга HTML внутри Markdown

39
public/admin/config.yml Normal file
View File

@ -0,0 +1,39 @@
backend:
name: gitea
repo: "pmi/pmi-site" # Например: rmn/pmi-site или komisc/pmi-website
gitea_domain: "https://gitea.komisc.ru" # Адрес вашего Gitea сервера
branch: main
auth_type: pkce
app_id: "06c80b30-fe28-4966-81e7-b6d59c5b4a87" # Вставьте сюда Client ID из настроек Gitea
# Папка, куда будут сохраняться загруженные картинки
media_folder: "static/uploads"
public_folder: "/uploads"
# Настройка раздела "Новости"
collections:
- name: "post"
label: "Новости и события"
folder: "content/post"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}/index"
fields:
- {label: "Заголовок", name: "title", widget: "string"}
- {label: "Дата публикации", name: "date", widget: "datetime"}
- {label: "Категория", name: "categories", widget: "list", default: ["Новости"]}
- {label: "Текст (формулы через $$...$$)", name: "body", widget: "markdown"}
# Настройка раздела "Сотрудники"
- name: "authors"
label: "Сотрудники"
folder: "content/authors"
create: true
slug: "{{slug}}/_index"
fields:
- {label: "ФИО", name: "title", widget: "string"}
- {label: "Должность", name: "role", widget: "string"}
- {label: "Ученая степень", name: "degree", widget: "string", required: false}
- {label: "Email", name: "email", widget: "string", required: false}
- {label: "ORCID", name: "orcid", widget: "string", required: false}
- {label: "Научные интересы", name: "interests", widget: "list", required: false}
- {label: "Краткая биография", name: "body", widget: "markdown", required: false}

13
public/admin/index.html Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Админ-панель PMI</title>
</head>
<body>
<!-- Подключаем скрипт Decap CMS -->
<script src="https://unpkg.com/decap-cms@3.1.11/dist/decap-cms.js" defer></script>
<!-- Сюда CMS загрузит свой интерфейс -->
</body>
</html>

View File

@ -7,15 +7,15 @@
</url><url>
<loc>http://localhost:1313/post/</loc>
<lastmod>2026-07-20T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/</loc>
<lastmod>2026-07-20T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/post/2026-07-20-seminar/</loc>
<lastmod>2026-07-20T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/categories/%D1%81%D0%B5%D0%BC%D0%B8%D0%BD%D0%B0%D1%80%D1%8B/</loc>
<lastmod>2026-07-20T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/</loc>
<lastmod>2026-07-20T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/authors/</loc>
</url><url>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
starter.zip Normal file
View File