带有快速页面的数据科学博客

如何以与托管和部署此博客相关的最少复杂性来启动DS / ML / AI / Tech博客。



2020年2月底,来自的家伙fast.ai向世界介绍了fastpages一个博客平台。我会注意到它fastpages基于Jekyll,关于Habré的很多帖子。



该引擎上的博客示例fastpages就是该博客



主要区别特征和优点fastpages是开箱即用的受支持的帖子格式:



  • Jupyter笔记本(扩展名.ipynb);
  • Markdown文件(扩展名.md);
  • Word文件(扩展名.docx


因此,博客作者需要以上述任何一种格式将帖子保存在适当的目录中:



  • './_notebooks/'代表.ipynb
  • './_posts/'代表.md
  • “ ./_word/”代表.docx


fastpages正如作者所声称的,其他一切都会做



fastpages 使用Github Pages进行托管,并使用Gi​​thub Actions自动化发布。



据我了解,这fastpages是对Github Pages + bundle的改进Jekyll,您可以立即从Jupyter笔记本电脑中获取已发布的帖子。



使用fastpages创建博客GitHub



, fastpages.



fastpages:



  1. fastpages



    图片
  2. pull request ( ~ 30 ), , .



    图片
  3. pull request'a .








. ./_config.yml, :



  • title — , ;



  • description — , (, );



  • github_username — GitHub ;



  • github_repo — , GitHub, Google Colab Binder Jupyter ;



  • default_badges — GitHub, Google Colab Binder Jupyter . , , default_badges true false. , Binder, default_badges:



    default_badges:
    github: true
    binder: false
    colab: true


  • url — , ;



  • baseurl — . /_config.yml ("Special Instructions for baseurl"). , ;



  • twitter_username — Twitter;



  • use_mathtrue, LaTeX;



  • show_description — . true;



  • google_analytics — Google Analytics;



  • pagination — , . 15. , , :

    图片



  • show_tags — , :



    图片



  • show_imagetrue . ( 2 ):



    图片





.ipynb fastpages



  1. ( : .ipynb, .md .docx) (./_notebooks, ./_posts ./_word). 2020-05-26-DS-fastpages-blog.ipynb. Jekyll ( ).

    :

    • YYYY-MM-DD-;
    • , , .
  2. commit push GitHub master.
  3. GitHub . ~5 . «Actions» GitHub. workflow, push master:

    • Check Configurations — (, ), ;
    • CI — ;
    • GH Pages Status — .

      , .
  4. , , . .

    , fastpages .




, , . , , , fastpages.



Jupyter ( Markdown ) , / .



# "Title"
> "Awesome summary"

- toc: true
- branch: master
- badges: true
- comments: true
- author: Hamel Husain & Jeremy Howard
- categories: [fastpages, jupyter]


Markdown , , .. ---.



:



---
title: "Title"
description: "Awesome description"
toc: true
layout: post
categories: [markdown]
---


, , YAML . , : - title: "Deep learning: A tutorial"



YAML.



( ):



  • toctrue , Markdown ;
  • badges [notebooks only] — true Google Colab, Binder GitHub, ;
  • hide_github_badge [notebooks only] — true GitHub;
  • hide_colab_badge [notebooks only] — true Google Colab;
  • hide_binder_badge [notebooks only] — true Binder;
  • branch [notebooks only] — Jupyter Colab GitHub. : master;
  • commentstrue ( );
  • authortrue ;
  • categories — ( "Tags").
  • image — , . (Twitter) :

    • images/figure.png;
    • /images ;
  • search_exclude — ( Search), , ;
  • hidetrue , :

  • sticky_rank — , . , .




/ . ( ), , .



, Jupyter . , .



  • #hide — , ;
  • #hide_input — ;
  • #collapse-hide — , , ;
  • #collapse-show — , .


Altair



Altair . . .







Jupyter .

图片





:



![](https://www.fast.ai/images/fastai_paper/show_batch.png "Credit: https://www.fast.ai/2020/02/13/fastai-A-Layered-API-for-Deep-Learning/")


:

图片



, , ( ), ( ).





.





Youtube



Youtube :



> youtube: https://youtu.be/L0boq3zqazI


Twitter



Twitter.



,



> twitter: https://twitter.com/jakevdp/status/1204765621767901185?s=20


:

图片



LaTeX



Jupyter LaTeX . , , use_math _config.yml (. ).



LaTeX :



> $$L(\theta) = \frac{1}{N} \sum_i^N{(y_i - \hat{y_i})^2} \rightarrow \min_{\theta}$$


:



大号θ=1个ñ一世ñÿ一世--ÿ一世^2θ





.



: > Warning: There will be no second warning!



图片

: > Important: Pay attention! It's important.



图片

: > Tip: This is my tip.



图片

: > Note: Take note of this.



图片



, .

,



> Note: A doc link to [an example website: fast.ai](https://www.fast.ai/) should also work fine.


:

图片



Emoji





   :robot:.


:

:robot:.



Emoji.





jupyter , Markdown . , :



{% raw %}For example, here is a footnote {% fn 1 %}.
And another {% fn 2 %}
{{ 'This is the footnote.' | fndetail: 1 }}
{{ 'This is the other footnote. You can even have a [link](https://fastpages.fast.ai/jupyter/2020/02/20/test.html#Footnotes)' | fndetail: 2 }}{% endraw %}


图片



fastpages



fastpages nbdev jupyter , word .md . , /_notebooks, /_word /_posts, GitHub Actions c nbdev , .



fast_templatefastpages



, fast.ai fast_template, , Word Jupyter , . fastpages , , .



, fast_template , . - Github, git.







  • ;
  • Jupyter + :

    • ;
    • / ;
    • GIF-;
    • youtube .
  • Medium;
  • url;
  • badges GitHub, Binder, Google Colab, ;
  • ;
  • sticky_rank, ;
  • ;




  • , :

  • WYSIWYG (What You See Is What You Get):

    • Jekyll ;
    • ;
  • Jekyll , .
  • Jekyll git ;
  • Jupyter ;
  • , spell checker Jupyter .




fast.ai DS , , .



, git, Markdown Jupyter Notebook. , .



, , , . pull request , .



, .



DS/ML/AI














All Articles