Jekyll:表内无序列表

发布于 2025-01-16 03:32:50 字数 992 浏览 2 评论 0原文

I am trying to build a table for a jekyll site that, in one column, holds an image and in the next column holds an unordered list of links associated with that image.

The markdown syntax for unordered lists (*,-,+) is not working, nor is the html when mixed in with markdown table.
Does anyone know how to make this work for jekyll? (note: images and links are working correctly)
See code below:

 <style>
    table { border: 1px solid black; width: 100%; }
    td, th {border: 1px solid black;width: 50%;}
</style>

|         Image           |                    Image Links                         |
|-------------------------|--------------------------------------------------------|
| <img src="image1.png"/> | *[Image1 link1][1]<br> *[Image1 Link2][2]              |
| <img src="image2.png"/> | <ul><li>Image2 Link1</li><li>Image2 Link2</li></ul>    |

I am trying to build a table for a jekyll site that, in one column, holds an image and in the next column holds an unordered list of links associated with that image.

The markdown syntax for unordered lists (*,-,+) is not working, nor is the html when mixed in with markdown table.
Does anyone know how to make this work for jekyll? (note: images and links are working correctly)
See code below:

 <style>
    table { border: 1px solid black; width: 100%; }
    td, th {border: 1px solid black;width: 50%;}
</style>

|         Image           |                    Image Links                         |
|-------------------------|--------------------------------------------------------|
| <img src="image1.png"/> | *[Image1 link1][1]<br> *[Image1 Link2][2]              |
| <img src="image2.png"/> | <ul><li>Image2 Link1</li><li>Image2 Link2</li></ul>    |

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我不咬妳我踢妳 2025-01-23 03:32:50

一般来说,Markdown 中的表格实现往往相当简单。我不知道有任何支持表内 Markdown 风格的列表。

因此,我相信您的表格必须使用 HTML:

table {
  border: 1px solid black;
  width: 100%;
}

td, th {
  border: 1px solid black;
  width: 50%;
}
<table>
  <thead>
    <tr>
      <th>Image</th>
      <th>Image Links</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><img src="http://placekitten.com/200/100"></td>
      <td>
        <!-- this _might_ work, but I'd use an HTML image even if it does -->
        <ul>
          <li>[Image1 link1][1]</li>
          <li>[Image1 Link2][2]</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td><img src="http://placekitten.com/200/100"></td>
      <td>
        <ul>
          <li><a href="">Image2 Link1</a></li>
          <li><a href="">Image2 Link2</a></li>
        </ul>
      </td>
    </tr>
  </tbody>
</table>

In general, table implementations in Markdown tend to be fairly simplistic. I'm not aware of any that support Markdown-style lists inside tables.

As a result, I believe you'll have to use HTML for your table:

table {
  border: 1px solid black;
  width: 100%;
}

td, th {
  border: 1px solid black;
  width: 50%;
}
<table>
  <thead>
    <tr>
      <th>Image</th>
      <th>Image Links</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><img src="http://placekitten.com/200/100"></td>
      <td>
        <!-- this _might_ work, but I'd use an HTML image even if it does -->
        <ul>
          <li>[Image1 link1][1]</li>
          <li>[Image1 Link2][2]</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td><img src="http://placekitten.com/200/100"></td>
      <td>
        <ul>
          <li><a href="">Image2 Link1</a></li>
          <li><a href="">Image2 Link2</a></li>
        </ul>
      </td>
    </tr>
  </tbody>
</table>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文