Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
bolg.html ページに最新の投稿を表示したい。だから私はLiquid構文を使用しました
しかし、以下に示す液体を使用してローカルで実行すると、ページにコードがそのまま表示され、_posts フォルダーから投稿が取得されません。
液体の構文は次のとおりです。
液体の構文
出力は以下のようになります
出力
私を助けてください。また、ブートストラップのTriangleというテンプレートを使用しています。私はgithubでホストしています。
私は何が悪いのか知っていると思います。あなたが言ったので、あなたのループは機能していません。そして、ループをand not で{% for blogpost in site.posts%}呼び出します。ループを次のように変更してみてください。postblogpostfor
{% for blogpost in site.posts%}
post
blogpost
for
{% for post in site.posts %}
そして、あなたは大丈夫なはずです!
この回答が正しいか有用である場合は、マークしてください。ありがとう!;)