grav-plugin-admin

getgravMIT活跃维护

Grav CMS 的官方后台管理插件,提供可视化仪表盘、内容编辑和 Markdown 编辑器,让用户无需命令行即可管理网站内容与配置。

Grav Admin Plugin

1.10.62发布于 2026-11-07 21:27 UTC378star223fork同步于 2026-11-10 12:00 UTC

怎么上手

由 README 提炼,执行前请确认
bin/gpm selfupgrade -f
bin/gpm install admin
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

Grav 的可选网页管理后台,用图形界面配置站点和增删改页面

Grav CMS 的官方后台管理插件,提供可视化仪表盘、内容编辑和 Markdown 编辑器,让用户无需命令行即可管理网站内容与配置。

核心能力

  • 提供登录、找回密码和登录用户管理
  • 一键更新 Grav 核心、主题和插件
  • 表单与 YAML 双模式编辑系统及站点配置
  • 页面列表支持筛选搜索,可创建、编辑、移动、复制、删除
  • 代码编辑器带语法高亮和即时预览,支持拖拽上传媒体

容易踩的坑

需先升级到 Grav 1.6.7 或更高版本;安装 admin 时会依赖 login、form、email 三个插件,需同意一并安装;装完还要用 bin/plugin login new-user 创建管理员账号才能登录

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本1.10.62
  1. 1.10.62最新正式版2026-11-07 · 2026-11-07 21:27 UTC

    Bugfix

    • [security] The forgot-password form answers the same way for every username: an unknown or blocked account, one that has asked for too many resets, and one that was sent an email all get the same message and the same page, and the rate-limit message no longer shows the account's email address. A site whose email isn't set up says so before looking up the account
  2. 1.10.612026-11-05 · 2026-11-05 21:41 UTC
    查看更新说明

    Bugfix

    • [security] Page saving now checks the folder name in every page action, and Save As only writes next to the page it was opened from. Thanks @rng70
    • [security] A page route containing . or .. segments no longer resolves to a page, so page saving and media uploads and deletions stay inside the pages folder
    • [security] The parent-page picker only lists folders inside the pages folder. Thanks @rng70
    • [security] Uploaded SVG files are sanitized whatever their last extension, in page media and in file fields
  3. 1.10.602026-09-28 · 2026-09-28 21:28 UTC
    查看更新说明

    Bugfix

    • Retrying an admin login while locked out no longer extends the lockout, and the message says how many minutes are actually left. The admin now uses the same login check as the frontend, so it needs Login 3.9.12 getgrav/grav-plugin-login#343
  4. 1.10.592026-09-14 · 2026-09-14 03:24 UTC
    查看更新说明

    Bugfix

    • The Expand All and Collapse All buttons now appear above a list field when its controls are set to top or both. Thanks @sridharkalaibala #2503
    • A placeholder set to 0 now shows instead of being treated as no placeholder at all. Thanks @sridharkalaibala #2521
    • SVG files now show a preview in the file picker, matching the media manager. Thanks @sridharkalaibala #2522
  5. 1.10.582026-09-09 · 2026-09-09 17:32 UTC
    查看更新说明

    Improved

    • A field's classes are now applied to the array, column, and columns field types, which previously ignored them #2508
    • Corrected and completed the Spanish translations #2509

    Bugfix

    • The array field no longer renders a second class attribute for its one-child state, which meant the attribute was silently dropped

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Grav Standard Administration Panel Plugin

    This admin plugin for Grav is an HTML user interface that provides a convenient way to configure Grav and easily create and modify pages. This will remain a totally optional plugin, and is not in any way required or needed to use Grav effectively. In fact, the admin provides an intentionally limited view to ensure it remains easy to use and not overwhelming. I'm sure power users will still prefer to work with the configuration files directly.

    Features

    • User login with automatic password encryption
    • Forgot password functionality
    • Logged-in-user management
    • One click Grav core updates
    • Dashboard with maintenance status, site activity and latest page updates
    • Notifications system for latest news, blogs, and announcements
    • Ajax-powered backup capability
    • Ajax-powered clear-cache capability
    • System configuration management
    • Site configuration management
    • Normal and Expert modes which allow editing via forms or YAML
    • Page listing with filtering and search
    • Page creation, editing, moving, copying, and deleting
    • Powerful syntax highlighting code editor with instant Grav-powered preview
    • Editor features, hot keys, toolbar, and distraction-free fullscreen mode
    • Drag-n-drop upload of page media files including drag-n-drop placement in the editor
    • One click theme and plugin updates
    • Plugin manager that allows listing and configuration of installed plugins
    • Theme manager that allows listing and configuration of installed themes
    • GPM-powered installation of new plugins and themes

    Support

    Support

    We have tested internally, but we hope to use this public beta phase to identify, isolate, and fix issues related to the plugin to ensure it is as solid and reliable as possible.

    For live chatting, please use the dedicated Discord Chat Room for discussions directly related to Grav.

    For bugs, features, improvements, please ensure you create issues in the admin plugin GitHub repository.

    Installation

    First ensure you are running the latest Grav 1.6.7 or later. This is required for the admin plugin to run properly (-f forces a refresh of the GPM index).

    $ bin/gpm selfupgrade -f
    

    The admin plugin actually requires the help of 3 other plugins, so to get the admin plugin to work you first need to install admin, login, forms, and email plugins. These are available via GPM, and because the plugin has dependencies you just need to proceed and install the admin plugin, and agree when prompted to install the others:

    $ bin/gpm install admin
    

    Manual Installation

    Manual installation is not the recommended method of installation, however, it is still possible to install the admin plugin manually. Basically, you need to download each of the following plugins individually:

    Extract each archive file into your user/plugins folder, then ensure the folders are renamed to just admin/, login/, form/, and email/. Then proceed with the Usage instructions below.

    Usage

    Create User with CLI

    After this you need to create a user account with admin privileges:

    $ bin/plugin login new-user
    

    Create User Manually

    Alternatively, you can create a user account manually, in a file called user/accounts/admin.yaml. This filename is actually the username that you will use to login. The contents will contain the other information for the user.

    password: 'password'
    email: '[email protected]'
    fullname: 'Johnny Appleseed'
    title: 'Site Administrator'
    access:
      admin:
        login: true
        super: true
    

    Of course you should edit your email, password, fullname, and title to suit your needs.

    You can use any password when you manually put it in this .yaml file. However, when you change your password in the admin, it must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters.

    Accessing the Admin

    By default, you can access the admin by pointing your browser to http://yoursite.com/admin. You can simply log in with the username and password set in the YAML file you configured earlier.

    After logging in, your plaintext password will be removed and replaced by an encrypted one.

    Standard Free & Paid Pro Versions

    If you have been following the blog, Twitter, Discord chat, etc., you probably already know now that our intention is to provide two versions of this plugin.

    The standard free version, is very powerful, and has more functionality than most commercial flat-file CMS systems.

    We also intend to release in the near future a more feature-rich pro version that will include enhanced functionality, as well as some additional nice-to-have capabilities. This pro version will be a paid plugin the price of which is not yet 100% finalized.

    Admin Events

    General events

    • onAdminRegisterPermissions - (admin)
    • onAdminThemeInitialized
    • onAdminPage - (page)
    • onAdminMenu
    • onAdminTwigTemplatePaths - (paths)

    Page specific events

    • onAdminDashboard
    • onAdminTools - (tools)
    • onAdminLogFiles - (logs)
    • onAdminGenerateReports - (reports)

    Tasks

    • onAdminControllerInit - (controller)
    • onAdminTaskExecute - (controller, method)

    Editing

    • onAdminData
    • onAdminSave - (object)
    • onAdminAfterSave - (object)

    Pages

    • onAdminPageTypes - (types)
    • onAdminModularPageTypes
    • onAdminSave - (page)
    • onAdminAfterSaveAs - (path)
    • onAdminAfterSave - (page)
    • onAdminAfterDelete - (page)
    • onAdminAfterAddMedia - (page)
    • onAdminAfterDelMedia - (page)
    • onAdminCreatePageFrontmatter - (header, data)

    Running Tests

    First install the dev dependencies by running composer update from the Grav root. Then composer test will run the Unit Tests, which should be always executed successfully on any site.