Python-ins'中的标记;t正确渲染链接

Python-ins'中的标记;t正确渲染链接,python,flask,markdown,flask-flatpages,Python,Flask,Markdown,Flask Flatpages,我正在使用Python、Flask和Flask页面构建一个网站。据我所知,FlatPages使用Jinja2模板引擎和降价来简化内容的格式 到目前为止,我一直通过在其他标记内容中写入以下原始HTML来包含图像: <figure> <a href="/static/path/to/image.png" title="Full size"> <img src="/static/path/to/image.png" alt=""> &

我正在使用Python、Flask和Flask页面构建一个网站。据我所知,FlatPages使用Jinja2模板引擎和降价来简化内容的格式

到目前为止,我一直通过在其他标记内容中写入以下原始HTML来包含图像:

<figure>
    <a href="/static/path/to/image.png" title="Full size">
        <img src="/static/path/to/image.png" alt="">
    </a>
    <figcaption>
        Figure caption.
    </figcaption>
</figure>

你是如何使用FlatPages的?还有,你为什么不写一个宏呢?@Blender我不知道你说的如何使用FlatPages是什么意思。我认为,由于标记意味着能够处理标记中的图像/链接,因此它可能是为每个图像编写大量标记的一种简单方法。是的,但如果这就是您使用它的全部目的,那么您并不是真正“使用”标记。FlatPages需要配置。它不仅仅是自动翻译模板。@包含图像和链接的Blender不是我使用markdown的唯一原因,我还使用它包括代码块、标题、,我已将FlatPages配置如下:DEBUG=False DEBUG=False ASSETS\u DEBUG=DEBUG FlatPages\u AUTO\u RELOAD=True FlatPages\u EXTENSION='.md'FlatPages\u ROOT='pages'app=Flask(name)app.config。from_object(name)pages=FlatPages(app)在块级HTML标记中未处理标准标记格式语法,但是一些扩展可以做到这一点。有关详细信息,请参阅。
<figure>
    [![][image]][image]
    <figcaption>
        Figure caption.
    </figcaption>
</figure>
[image]: /static/link/to/image.png (Full size)
<p><figure>
    <a href="/static/link/to/image.png" title="Full size">
        <img src="/static/link/to/image.png" alt="" title="Full size" />
    </a>
    <figcaption>
        Figure caption.
    </figcaption>
</figure></p>
<figure>
    [![][image]][image]
    <figcaption>
        Figure caption.
    </figcaption>
</figure>
Flask==0.9
Flask-Assets==0.8
Flask-FlatPages==0.3
Flask-Markdown==0.3
Jinja2==2.6
Markdown==2.2.1
Werkzeug==0.8.3