У меня есть Vuepress репозиторий на GitHub , и я пытаюсь использовать NetlifyCMS без опции деполяции на Netlify сайт.
Я могу установить CMS без проблем, с файлами config.yml и index.html, но если я захожу на www.site.com/admin, я получаю ошибку API - Не удалось загрузить запись: API_ERROR: Нет Найдено
Если я создаю приложение OAuth на GitHub, я могу использовать URL-адрес обратного вызова авторизации https://api.netlify.com/auth/done и настроить его с помощью Client ID и Client Secret на Netlify. Я не получу ошибку API, но я нужен только вариант CMS от Netlify. Возможно ли это?
Я пытался проверить документацию, но заблудился:
https://www.netlifycms.org/docs/add-to-your-site/
https://www.netlifycms.org/docs/authentication-backends/
Структура папок для служб администратора:
.vuepress
|_public
|_admin
|_config.yml
|_index.html
Внутри папки администратора:
config.yml:
backend:
name: github
accept_roles: #optional - accepts all users if left out
- admin
- editor
repo: "Company/repositoryName"
branch: master # Branch to update (optional; defaults to master)
publish_mode: editorial_workflow
media_folder: "/.vuepress/public/images"
public_folder: "/images"
collections:
- name: "docs" # Used in routes, e.g., /admin/collections/blog
label: "Docs" # Used in the UI
folder: "docs" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- {label: "Title", name: "title", widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>
</html>