问题标签 [grav]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
660 浏览

php - Apache 中的权限被拒绝而不是 777

我很难在 CentOS 上部署使用Grav构建的 PHP 网站。

每当我尝试打开网站时,我都会收到 500 服务器错误。日志说:

我按照此处提到的指南进行操作,但没有帮助。

然后,我做了,chmod 777 -R glug_nith/但它仍然不起作用。我什至登录到apache用户使用sudo -u apache bash,看看我是否能够在 myapp 中创建文件夹和文件,我成功了。我尝试删除.htaccess文件以查看是否有帮助,但没有。

我无法理解为什么它的显示权限被拒绝而不是获得所有权限。我也找不到任何可能阻止许可的东西。请帮忙。

0 投票
2 回答
395 浏览

html - Grav - 在菜单中跳过主页

我正在制作我的第一个 Grav 网站。

我正在尝试创建一个导航菜单,我希望它显示指向所有可见页面的链接,但不显示主页。目前主页作为第一个链接出现,有没有办法跳过它?

0 投票
1 回答
345 浏览

php - Grav CMS 扰流板

如何使用 Markdown 或插件在Grav CMS中进行剧透(隐藏文本或块)?官方Markdown和Markdown Extra(Grav 支持)没有剧透。

我尝试像这样扰流板,但不适用于 Grav。

>! spoiler

扰流板

0 投票
1 回答
463 浏览

php - 对不同子域下不同应用的集中认证。

我有两个应用程序在同一个基域下运行。

docs.application.com转到文档,它是用 PHP (Grav CMS) 编写的。

www.appliation.com转到我用 Node 和 React 编写的应用程序。

Grav CMS 有一个我正在使用的 Google oauth 插件,我的应用程序也使用 Google oauth 登录。

我想以一种可以登录任何应用程序并自动登录另一个应用程序的方式集中登录。

我一直在阅读有关中央身份验证服务和跨域登录的信息,但到目前为止我无法管理解决方案。

有什么想法吗?

0 投票
1 回答
1531 浏览

android - 网站链接在手机上打不开

我有一个已部署的网站,在本地和服务器上运行良好:

autrecote.be/en

除了菜单(包括描述和联系人)不起作用,但仅适用于智能手机。

当我使用 Grav CMS 时,我没有进行响应式调整,我不知道从哪里开始寻找。什么可能导致链接只能在计算机浏览器上工作?

非常感谢您的帮助

编辑 :

感谢下面的答案,我设法找到了错误,这些行在普通菜单的文件中,但不在移动菜单中:

确实,我发现了错误,这一行在普通菜单的文件中,但不在移动菜单中:

它现在正在工作,非常感谢。

0 投票
1 回答
331 浏览

grav - 如何通过 Asset Manager 将动态变量传递给脚本

我想使用一些参数向 Grav 添加一些脚本。

这和其他一些东西,比如

不工作。我错过了什么?我想使用主题中的图像路径传递给脚本。

0 投票
2 回答
559 浏览

css - How do I minify CSS after updating a Grav theme's "un-minified" CSS file?

I'm using the Saturn Site theme from Grav (https://getgrav.org/downloads/skeletons) and want to change the background image of the home page (and eventually other styles). In the theme's custom CSS (user/themes/saturn/css/custom.css) I changed the background image, but the new image is not rendered unless I update both custom.css and custom.min.css.

I believe it is inappropriate to change both files; the system should generate a new version of the minified CSS. Reading the Grav docs (https://learn.getgrav.org/themes/asset-manager) I discovered that Grav provides

an Asset Pipeline that can be used to minify and compress assets to reduce the number of browser requests, and also the overall size of the assets.

How do I run this pipeline to update/minify the theme's CSS? Or do I need to install a separate CSS minifying tool?

Additional information: My user/config/system.yaml file includes this:

assets: css_pipeline: false # The CSS pipeline is the unification of multiple CSS resources into one file css_minify: true # Minify the CSS during pipelining css_rewrite: true # Rewrite any CSS relative URLs during pipelining

0 投票
1 回答
298 浏览

html - 重力CMS | 物化CSS | 我们如何将 Materialize CSS 与 Grav 表单插件一起使用?

我们如何更改包含的 Form-plugin 生成的表单页面的外观(CSS)?

我为网站的其余部分添加了自己的 CSS,但我的 Markdown contact.md 页面看起来很糟糕,而且我正在使用 Materializecss 框架。

我设法将 Markdown 包含到其他页面的 HTML 中,但是 Forms 插件为表单创建了自己的 HTML,所以我不能像那样将表单字段放在我的 HTML 中。

我是否需要从与表单插件相关的某个地方删除 CSS,在某处更改插件格式的默认 HTML,或者我是否需要以某种方式为表单字段的 Markdown 文件提供一些类?

谢谢!

0 投票
1 回答
567 浏览

php - 在 Grav 降价内容中添加自定义属性会破坏它

重力和降价问题在这里。

PHP Markdown Extra中,Michel Fortin 写道,我们可以使用这种语法:

将类、id 和自定义属性添加到元素(在本例中为标题)。

但我在 Github Flavored Markdown doc 或 Grav doc 中找不到提及这一点。

如果在我的 Grav 安装中添加一个类或 id 完全可以工作,那么添加一个自定义属性就不行了。事实上,它打破了我的标题。

完美编译为

编译为

好像没有被认出来……</p>

有人和我有同样的问题吗?

注意:Markdown Extra 插件已安装并激活。

提前致谢!

0 投票
1 回答
614 浏览

url - How to change the page urls in grav CMS

URLs are automatically taken from folder structure. I want to change URLs to SEO-friendly URLs. Can anyone help me to do so. Thanks in advance.