当前位置: 首页 > news >正文

网站建设主要研究内容域名注册了如何做网站

网站建设主要研究内容,域名注册了如何做网站,花生壳做的网站,十大app开发公司排名目录 步骤一#xff1a;添加插件 步骤二#xff1a;添加pdf地址 步骤三#xff1a;成果展示 docsify是一个在github上很好用的文档转换网页的工具#xff0c;但是大部分情况我们都是使用的markdown文件。最近想把pdf文档也能支持在这上面展示#xff0c;研究后总结一下…目录 步骤一添加插件 步骤二添加pdf地址 步骤三成果展示 docsify是一个在github上很好用的文档转换网页的工具但是大部分情况我们都是使用的markdown文件。最近想把pdf文档也能支持在这上面展示研究后总结一下方便有共同想法的小伙伴使用。 步骤一添加插件 首先我们借助的是下面的仓库 Docsify PDF嵌入式插件 To use, simply put these 2 lines below where you import the docsify.min.js file. !-- PDFObject.js is a required dependency of this plugin -- script src//cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js/script !-- This is the source code of the pdf embed plugin -- script srcpath-to-file/docsify-pdf-embed.js/script !-- or use this if you are not hosting the file yourself -- script src//unpkg.com/docsify-pdf-embed-plugin/src/docsify-pdf-embed.js/script 然后在使用markdown文档中 引入pdf的在线地址 ### Here are some of your previous markdown contents blah blah blahpdfpath-to-the-pdf-file如果不能展示 或者有其他问题的话 根据文档介绍可以使用替换上面code后面的function为下面的renderer_func的function window.$docsify {name: some name,repo: some git repository,homepage: some_homepage.md,notFoundPage: some_404_page.md,markdown: {//If you have defined the follow section, //then you need to follow the steps in the next section.//(only the code section matters in this plugin)/* SECTION STARTcode: function(code, lang){some custom functions herereturn some_custom_results;}SECTION END */} }//替换上面code后面的function为下面的functionvar renderer_func function(code, lang, basenull) { var pdf_renderer function(code, lang, verify) {function unique_id_generator(){function rand_gen(){return Math.floor((Math.random()1) * 65536).toString(16).substring(1);}return rand_gen() rand_gen() - rand_gen() - rand_gen() - rand_gen() - rand_gen() rand_gen() rand_gen();}if(lang !lang.localeCompare(pdf, en, {sensitivity: base})){if(verify){return true;}else{var divId markdown_code_pdf_container_ unique_id_generator().toString();var container_list new Array();if(localStorage.getItem(pdf_container_list)){container_list JSON.parse(localStorage.getItem(pdf_container_list)); }container_list.push({pdf_location: code, div_id: divId});localStorage.setItem(pdf_container_list, JSON.stringify(container_list));return (div stylemargin-top: PDF_MARGIN_TOP ; margin-bottom: PDF_MARGIN_BOTTOM ; id divId a href code Link /a to code /div);} }return false;}if(pdf_renderer(code, lang, true)){return pdf_renderer(code, lang, false);}/* SECTION START: Put other custom code rendering functions herei.e. If the language of the code block is LaTex, put the code below to replace original code block with the text: Using LaTex is much better than handwriting! inside a div container.if (lang latex) {return (div classcontainerUsing LaTex is much better than handwriting!/div);}SECTION END */return (base ? base : this.origin.code.apply(this, arguments)); } 步骤二添加pdf地址 对于我们pdf的地址 我们可以直接上传的github仓库里面当然也可以使用自己的oss地址啥的。下面介绍一下git上pdf的地址填写。 上面可以拷贝出pdf的地址但是需要我们替换一下。 假设 GitHub 文件的原 URL 是 https://github.com/helloworld/Java/blob/master/docs/Algorithms, 4th Edition.pdf 将其更改为 https://raw.githubusercontent.com/helloworld/Java/master/docs/Algorithms, 4th Edition.pdf即将 github.com 替换为 raw.githubusercontent.com并去除 /blob。 原因 raw.githubusercontent.com 返回存储在 GitHub 中的文件的 raw content原始内容因此可以将它们简单地下载到计算机上。可以在网页上右键查看源文件的方式验证文件 URL 是否包含 raw.githubusercontent.com ps:注意 如果提交修改了某个pdf对应的地址也会变需要改成新的。 步骤三成果展示
http://www.hkea.cn/news/14593614/

相关文章:

  • 如何让网站长尾关键词有排名谁知道免费网站
  • 江西网站定制公司网站开发有哪些语言
  • 李氏牛仔网站建设风如何给自己做网站
  • 网站 建设 维护 公司端 传媒网站模板
  • 网络营销师考试内容优化网站 主题
  • 网站提供入口太原网页制作招聘网
  • 深圳做网站开发费用wordpress后台登录
  • 开设公司网站个人主页制作教程
  • wordpress 阿狸主题北京培训seo哪个好
  • 空间网站大全江苏省建是国企吗
  • 网站模仿算侵权吗如何把网站放到空间别人可以访问
  • 河北建设工程网站临沂网站制作加速企业发展
  • 合肥网站建设技术工业设计本科生作品集
  • 大连专业模板网站制作北京有什么网上推广的网站吗
  • 建一个下载网站要什么cms系统可信赖的做pc端网站
  • 山东省建设机械协会网站wordpress 主题哪里买
  • 公司网站制作公有个新网站能提供
  • 中国住房建设部网站首页上海做网站就用乐云seo
  • 网站排名要怎么做国际域名网站
  • 用wordpress开发网站模板黑龙江建设局网站
  • 民权网站建设南山出名的互联网公司
  • 公司网站的开发秦皇岛百度推广
  • 网站开发融资网站改版后不收录
  • 网站上的二维码怎么做的ui设计师与前端开发怎么对接
  • 深圳制作网站专业wordpress 命令行
  • 网站建设代理商电话深圳富通做网站
  • 湖南建设网站the 7 wordpress theme
  • 免费制作微信小程序的网站wordpress 媒体库加载不了图片
  • 建设旅游网站深圳高端网站设计建设
  • 做化学合成的网站有哪些西安手机定制网站建设