【发布时间】:2017-09-11 14:51:47
【问题描述】:
我在理解 Apostrophe CMS 方面存在问题。我按照[创建您的第一个项目][1] 中的教程进行操作,并在事情变得有趣之前停下来。
我可以使用 localhost:3000 打开我的基本/默认网站并查看 home.html 文件的内容,而 localhost:3000/home 抛出错误。这是我的 home.html 文件:
my-project\lib\modules\apostrophe-pages\views\pages\home.html
{#
This is an example home page template. It inherits and extends a layout template
that lives in lib/modules/apostrophe-templates/views/outerLayout.html
#}
{% extends data.outerLayout %}
{% block title %}{{ super() }} | Home{% endblock %}
{% block main %}
<div class="main-content">
<h3>Hello world!
{% if not data.user %}
<a class="login-link" href="/login">Login</a>
{% endif %}
</h3>
<p>This is a very barebones Apostrophe project.
Now, get to work and make a real website!</p>
</div>
{% endblock %}
- 撇号知道 home.html 是需要呈现的第一个(开始)页面的设置在哪里?
- 反之亦然,我在调用localhost:3000时看到一个页面,撇号直接重定向到localhost:3000/home。我告诉撇号的设置在哪里自动从 localhost:3000 移动到 localhost:3000/home?
【问题讨论】: