GVKun编程网logo

如何在 GitHub Markdown 表中绘制复选框或刻度线?(github上写markdown)

11

本篇文章给大家谈谈如何在GitHubMarkdown表中绘制复选框或刻度线?,以及github上写markdown的知识点,同时本文还将给你拓展AlfredWorkflow一键上传图片到github返

本篇文章给大家谈谈如何在 GitHub Markdown 表中绘制复选框或刻度线?,以及github上写markdown的知识点,同时本文还将给你拓展Alfred Workflow 一键上传图片到github 返回markdown、css3 – 如何在GitHub自述文件中使用Markdown渲染多个列?、Gitee 推荐 | VS Code 的 Markdown 插件 Markdown Editor、github image 标签转 markdown 工具源代码等相关知识,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

如何在 GitHub Markdown 表中绘制复选框或刻度线?(github上写markdown)

如何在 GitHub Markdown 表中绘制复选框或刻度线?(github上写markdown)

我可以使用在 Github README.md 列表中绘制复选框

- [ ] (for unchecked checkbox)- [x] (for checked checkbox)

但这在表格中不起作用。有人知道如何在 GitHub Markdown 表中实现复选框或复选标记吗?

答案1

小编典典

尝试在or-之前添加一个。那是一个后跟一个空格。`[][x]-```

下面是一个来自 Github 博客的例子。

### Solar System Exploration, 1950s 鈥� 1960s- [ ] Mercury- [x] Venus- [x] Earth (Orbit/Moon)- [x] Mars- [ ] Jupiter- [ ] Saturn- [ ] Uranus- [ ] Neptune- [ ] Comet Haley

如下所示:

结果图像

以下是如何在表格中执行相同操作:

| Task           | Time required | Assigned to   | Current Status | Finished | |----------------|---------------|---------------|----------------|-----------|| Calendar Cache | > 5 hours  |  | in progress | - [x] ok?| Object Cache   | > 5 hours  |  | in progress | [x] item1<br/>[ ] item2| Object Cache   | > 5 hours  |  | in progress | <ul><li>- [x] item1</li><li>- [ ] item2</li></ul>| Object Cache   | > 5 hours  |  | in progress | <ul><li>[x] item1</li><li>[ ] item2</li></ul>- [x] works- [x] works too

这是它的外观:

在此处输入图像描述

Alfred Workflow 一键上传图片到github 返回markdown

Alfred Workflow 一键上传图片到github 返回markdown

Alfred Workflow 一键上传图片到github

在编写markdown文件中,截图作说明,可以直接截图后将图片上传到github,并且返回markdown格式的图片语法

注意:Pillow模块不支持从剪贴板获取gif图片,所以目前不支持gif上传

image

运行环境

Alfred + Mac

支持图片类型

  • JPG
  • PNG

工作原理

  1. 使用Alfred热键功能触发Workflow工作流程,执行Python脚本。
  2. 使用Pillow模块从剪贴板Clipboard中获取jpg/png图片文件,并且移动到project_path目录下
  3. 提交project_path目录下的文件到github仓库

安装

安装python的Pillow模块

pip install Pillow

下载Alfred的Workflow并打开安装

下载Markdown-image-upload-github

配置

打开Alfred的Workflow配置脚本的变量

配置项 说明
github_repo 图床仓库名称
github_username 用户名
project_path 本地的图床项目路径

image

上传图片

上传图片支持两种方式,一种是截取图片到剪贴板、另外一种是直接复制图片文件

截取图片到剪贴板(微信截图、mac自带截图工具)

  1. 截取图片到剪贴板
  2. command+g

复制jpg、png文件

  1. 复制图片文件
  2. command+g

说明

相关原理借鉴了《快速上传图片到七牛云空间kaito-kidd/markdown-image-alfred》

css3 – 如何在GitHub自述文件中使用Markdown渲染多个列?

css3 – 如何在GitHub自述文件中使用Markdown渲染多个列?

为了呈现三列中的项目,我尝试将以下 CSS3指令添加到项目的README.md文件中,但样式已被删除:

<divhttps://www.jb51.cc/tag/ott/" target="_blank">otted #e0e0e0; -moz-column-rule: 1px dotted #e0e0e0; column-rule: 1px dotted #e0e0e0;">
    <divhttps://www.jb51.cc/tag/dis/" target="_blank">display: inline-block;">
        <!-- first column's content -->
    </div>
    <divhttps://www.jb51.cc/tag/dis/" target="_blank">display: inline-block;">
        <!-- second column's content -->
    </div>
    <divhttps://www.jb51.cc/tag/dis/" target="_blank">display: inline-block;">
        <!-- third column's content -->
    </div>
</div>

这种样式在GitHub处理Markdown之外正常工作.如何将数据放入Markdown文档中的多个列?请注意,我不关心对IE浏览器的支持,也不关心IE是否呈现单个列(无论如何,我的软件项目在Windows客户端上都不起作用).

解决方法

GitHub-Flavored Markdown only permits certain whitelisted tags and attributes in inline HTML:

HTML

You can use a subset of HTML within your READMEs,issues,and pull requests.

A full list of our supported tags and attributes can be found in 07001.

关于< div>标签,README表示除了常规属性白名单外,只有itemscope和itemtype属性被列入白名单:

abbr,accept,accept-charset,accesskey,action,align,alt,axis,border,cellpadding,cellspacing,char,charoff,charset,checked,cite,clear,cols,colspan,color,compact,coords,datetime,dir,disabled,enctype,for,frame,headers,height,hreflang,hspace,ismap,label,lang,longdesc,maxlength,media,method,multiple,name,nohref,noshade,Nowrap,prompt,readonly,rel,rev,rows,rowspan,rules,scope,selected,shape,size,span,start,summary,tabindex,target,title,type,usemap,valign,value,vspace,width,itemprop

没有标签支持style属性.

除非你可以与README中列出的标签和属性一起破解,我想你会发现你运气不好.

另一种方法是组建一个GitHub Pages站点,这似乎更灵活.

Gitee 推荐 | VS Code 的 Markdown 插件 Markdown Editor

Gitee 推荐 | VS Code 的 Markdown 插件 Markdown Editor

一个 VS Code 插件,让你的 VS Code 秒变和 typora 一样的所见即所得 markdown 编辑器,支持表格可视化编辑,拖拽图片,各种图标等。

github image 标签转 markdown 工具源代码

github image 标签转 markdown 工具源代码

旧的图片格式:

结果:

新的 url:

新的图片格式:

要获取更多 Jerry 的原创文章,请关注公众号 "汪子熙":

本文同步分享在 博客 “汪子熙”(CSDN)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与 “OSC 源创计划”,欢迎正在阅读的你也加入,一起分享。

关于如何在 GitHub Markdown 表中绘制复选框或刻度线?github上写markdown的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于Alfred Workflow 一键上传图片到github 返回markdown、css3 – 如何在GitHub自述文件中使用Markdown渲染多个列?、Gitee 推荐 | VS Code 的 Markdown 插件 Markdown Editor、github image 标签转 markdown 工具源代码等相关知识的信息别忘了在本站进行查找喔。

本文标签: