Jekyll是一个用Ruby编写的支持博客的静态站点生成器。在提出问题之前,请参阅https://talk.jekyllrb.com。
更新到 Ubuntu 22.04 后,我的 Jekyll 失败了。 捆绑执行 jekyll 服务会产生此错误: ... 8.248 秒内完成。 杰基尔 3.9.0 |错误:没有 Has 的隐式转换...
我正在为一个开源项目做出贡献,该项目的文档使用 Jekyll 构建并托管在 Github Pages 上。我正在尝试在文档中添加重定向,因此我已经分叉了它并正在使用 j...
我使用 jekyll 构建了我的网站,并一直在寻找 stackoverflow 来尝试解决我的问题(.md 文件中的图像渲染用于生成帖子,但帖子本身不显示图像)。 我的吉苏...
我试图仅在我的博客上对 3 个最新的“精选”帖子进行排序,但我当前的 for 循环不允许我对集合进行排序以首先显示最新的帖子。 我下面有什么...
所以,我尝试在我的 mac 上安装 Jeykll,正如我在运行 gem 时所说的那样,我收到此错误: 错误:执行 gem 时... (Gem::FilePermissionError) 您没有 /Library/R... 的写入权限...
更改 Jekyll、Just the Docs、Github 页面上的 H1 颜色
我需要帮助更改网站上的 H1 颜色。该网站是 Jekyll 上的 Just the Docs 主题,托管在 Github Pages 上。 我创建了以下文件和代码: _sass/自定义/custom.scss .h1 {...
我想用 Jekyll 制作一个照片库,其中每个图像都有自己的页面。理想情况下,我不想手动为每个图像制作 .md 页面,因为有 700 多个图像。 每个图像应该使用...
Github 页面上的 Markdown 到 HTML 转换会忽略受防护的代码示例的背景
我是第一次使用 Github Pages 设计师。我有大量 .md 文件,它们在 Markdown 编辑器中显示得很漂亮,但是当转换为 HTML 时,所有受隔离的代码块都没有灰色
我根据文档中的教程创建了一个新的 jekyll 项目。 https://jekyllrb.com/docs/step-by-step/01-setup/ 我想覆盖我的项目的主页。我在
MathJax 不允许在 GitHub Pages 上进行多行内联数学
这是我的 mathjax.html: MathJax.Hub.Config({ TeX:{ equationNumbers: { autoNumber: "all" }, tagSide:“对&q...</desc> <question vote="0"> <p>这是我的<pre><code>mathjax.html</code></pre>:</p> <pre><code><script type="text/x-mathjax-config"> MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "all" }, tagSide: "right" }, tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true } }); </script> <script src="https://cdn.jsdelivr.net/gh/mathjax/MathJax@legacy-v2-develop/unpacked/MathJax.js?config=TeX-AMS_CHTML"> </script> </code></pre> <p>它包含在 <pre><code>head.html</code></pre> 文件夹中的 <pre><code>_includes\</code></pre> </p> <pre><code>% include mathjax.html % </code></pre> <p>它在我的 GitHub 页面上运行得很好。但是,它不允许内联数学对象中存在多行。例如,</p> <pre><code>Let $X = \left[ \begin{matrix} X_1 \\ X_2 \end{matrix} \right]$ follow a [bivariate normal distribution](/D/bvn): </code></pre> <p>错误给出</p> <p><a href="https://i.stack.imgur.com/AKLvI.png" target="_blank"><img src="https://cdn.txt58.com/i/AWkuc3RhY2suaW1ndXIuY29tL0FLTHZJLnBuZw==" alt=""/></a></p> <p>以至于我不得不使用不需要的符号</p> <pre><code>Let $X = \left[ \begin{matrix} X_1 & X_2 \end{matrix} \right]^\mathrm{T}$ follow a [bivariate normal distribution](/D/bvn): </code></pre> <p>正确导致</p> <p><a href="https://i.stack.imgur.com/bbOqk.png" target="_blank"><img src="https://cdn.txt58.com/i/AWkuc3RhY2suaW1ndXIuY29tL2JiT3FrLnBuZw==" alt=""/></a></p> <p>有没有一种方法可以在内联数学中包含多行。 (在独立方程中,即使用 <pre><code>$$ ... $$</code></pre>,它有效!)</p> </question> <answer tick="false" vote="0"> <p>MathJax 中的内联数学所面临的问题是因为默认情况下 MathJax 不支持内联数学中的换行符。它旨在将内联数学格式化为单行。这与显示数学不同,显示数学包含在 <pre><code>$$ ... $$</code></pre> 或 <pre><code>\[ ... \]</code></pre> 中,并支持换行符和多行方程。</p> <p>如果您想在内联数学中包含多行,您可能需要考虑替代方法或解决方法:</p> <ol> <li><p><strong>使用显示数学</strong>:如果可能,您可以使用显示数学(例如,<pre><code>$$ ... $$</code></pre>或<pre><code>\[ ... \]</code></pre>)来代替需要多行的方程的内联数学。这将允许您根据需要设置带换行符的方程格式。</p> </li> <li><p><strong>MathJax 对齐环境</strong>:您可以在内联数学中使用 MathJax 的 <pre><code>align</code></pre> 环境来创建多行方程。例如:</p> <pre><code>Let $X = \begin{align} X_1 \\ X_2 \end{align}$ follow a [bivariate normal distribution](/D/bvn): </code></pre> <p>这将创建多行内联数学,但您可能需要调整对齐方式以满足您的需要。</p> </li> <li><p><strong>HTML 换行符</strong>:您可以在内联数学中使用 HTML 换行符。例如:</p> <pre><code>Let $X = X_1 \\<br> X_2$ follow a [bivariate normal distribution](/D/bvn): </code></pre> <p>此方法使用 HTML 换行符标签 <pre><code><br></code></pre> 在内联数学中引入换行符。它不像 LaTeX 换行那么干净,但可以在 MathJax 中用于内联数学。</p> </li> <li><p><strong>自定义 CSS 样式</strong>:您还可以探索自定义 CSS 样式以强制内联数学中的换行符。这种方法可能需要更高级的 CSS 知识,并且可能不太简单。</p> </li> </ol> <p>请注意,虽然这些解决方法可以帮助您在内联数学中实现多行方程,但它们可能无法完美复制 LaTeX 中独立方程的格式和控制。您可能需要试验和调整解决方案,以满足您的特定要求以及 MathJax 在您环境中的功能。</p> </answer> </body></html>
我正在使用 Markdown 和 Jekyll 设置和配置我的第一组 Github 页面。我的所有内容都已转换为 Markdown,生成的网页的基本外观和感觉是
我刚刚开始使用 jekyll 写博客。我用 Markdown 写帖子。现在,我想在我的帖子中添加一个 YouTube 视频。我怎样才能做到这一点? 另外,我不太喜欢突出显示的 pygments...
这就是我的代码的样子。我循环浏览每篇文章,使其显示在我的网站上。 {% 为... 这就是我的代码的样子。我循环浏览每篇文章,使其显示在我的网站上。 <div class="blog-container"> <div class="posts"> {% for post in site.posts %} <div class="post-preview"> <h2 class="post-title hover-underline-animation"><a href="{{ post.url }}" class="blue">{{ post.title }}</a></h2> <p class="post-date">{{ post.date | date: "%B %d, %Y" }}</p> <div class="post-summary"> {{ post.summary | strip_html }} </div> </div> {% endfor %} </div> </div> 我不确定如何使间距达到我想要的效果,同时在调整页面大小时保持不变。我是一个尝试使用 Jekyll 的完全初学者。非常感谢所有帮助! 您可以使用 padding 和 margin 来实现您的结果。我有下面的代码,它使用纯 HTML 和 CSS,但在 Jekyll 中,您也可以将样式标签附加到您的页面并实现相同的结果。 <style> *{ margin: 0; padding: 0; } .blog-container { display: grid; } .post-preview { padding: 20px; text-align: left; } .post-title { padding-bottom: 1px; margin-bottom: 1px; } .post-date { font-style: italic; margin-bottom: 30px; } a{ text-decoration: none; } </style> <div class="blog-container"> {% for post in site.posts %} <div class="post-preview"> <h2 class="post-title hover-underline-animation"><a href="{{ post.url }}" class="blue">{{ post.title }}</a></h2> <p class="post-date">{{ post.date | date: "%B %d, %Y" }}</p> <div class="post-summary"> {{ post.summary | strip_html }} </div> </div> {% endfor %} </div> 您可以使用以下代码作为参考。 <style> *{ margin: 0; padding: 0; } .blog-container { display: grid; } .post-preview { padding: 20px; text-align: left; } .post-title { padding-bottom: 1px; margin-bottom: 1px; } .post-date { font-style: italic; margin-bottom: 30px; } a{ text-decoration: none; } </style> <div class="blog-container"> <div class="post-preview"> <h2 class="post-title hover-underline-animation"><a href="url1" class="blue">Title: Lorem Ipsum has been the industry's standard</a></h2> <p class="post-date">01.01.2023</p> <div class="post-summary"> Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged </div> </div> <div class="post-preview"> <h2 class="post-title hover-underline-animation"><a href="url1" class="blue">Title: Lorem Ipsum has been the industry's standard</a></h2> <p class="post-date">01.01.2023</p> <div class="post-summary"> Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged </div> </div> </div> 希望这有帮助 我不知道你的CSS类是如何设置的,但是你可以通过添加:padding-top: 16px和padding-bottom: 16px(根据需要调整px值)到你的post-preview类来轻松实现它。
转换错误:Jekyll::Converters::Scss 遇到错误
我下载了新的材质 bootstrap css 并想在我的 jekyll 博客中使用它。设置并运行 jekyllserve -w 在本地编译站点后,控制台返回此错误
为什么 gem 告诉我当前的 ruby 版本是 2.5.0,但事实并非如此?
上下文:我正在尝试在 Ubuntu 18.04 LTS 上安装 jekyll,以便我可以在 GitHub Pages 站点上工作,而不必每次想查看更改时都将其部署到生产环境中。 现场是这样的...
如何解决安装 ruby 3.1.3 for Mac 时出现 OpenSSL 错误
当我尝试安装 ruby-install ruby 3.1.3(按照安装 Jeykll 的说明)时,出现以下错误。我认为问题是这个链接说大于 3.1 的 ruby 版本需要 Open...
我正在用 Markdown 编写一个页面。我正在尝试实现类似以下的内容: 某事 建议采用什么方法来执行此操作?我是...
我试图简单地在 Jekyll 中设置我的活动链接的样式,但没有成功地让它们工作。 这是我试图让他们工作的网站:http://concisecss.github.io/con...
我正在使用 Jekyll 在 Github 页面上托管一个网站。问题在于引用 css 文件中的文件路径。 我想做这样的事情: 正文 { {背景:#FFF url('{{ site.baseurl}}/...
0.0.0.0、127.0.0.1 和 localhost 有什么区别?
我在我的 Mac 上使用 Jekyll 和 Vagrant。我发现 Jekyll 服务器将绑定到 0.0.0.0:4000 而不是 127.0.0.1:4000。 gem 服务器也会默认绑定到这个地址。我仍然可以通过