fastpagesの紹介:Jupyter Notebook向けの追加機能を備えた使いやすいブログプラットフォーム
fastpagesは、Jupyter Notebookに特化した追加機能を備えた、使いやすいブログ作成プラットフォームです。
キーポイント
Jupyter Notebookから自動的にブログ投稿を生成できる無料プラットフォームfastpagesのリリース
GitHub PagesとGitHub Actionsを活用した3分セットアップで技術的知識不要
従来のfast_templateより柔軟でWord文書やMarkdownからの投稿作成も可能
インタラクティブ可視化や折りたたみコードセルなどJupyter特有の機能をブログで保持
影響分析・編集コメントを表示
影響分析
fastpagesはAI/データサイエンス分野の研究者・開発者が研究成果を簡単に共有・発信する障壁を大幅に低減する。Jupyter Notebookのインタラクティブ性を維持したままブログ化できる点は、再現可能な研究の普及とオープンサイエンスの促進に貢献する可能性がある。
編集コメント
AI研究のアウトリーチを民主化するツールとして注目。技術的詳細に囚われず成果を発信できる環境は、分野全体のコミュニケーション活性化に寄与する。
以下は、英語記事「Introducing fastpages, An easy to use blogging platform with extra features for Jupyter Notebooks.」の詳細な日本語要約です。
タイトル: fastpagesの紹介 - Jupyter Notebook向け追加機能を備えた、使いやすいブログプラットフォーム
fastpagesは、無料で広告なしのブログ作成・ホスティングを可能にするプラットフォームとして正式にリリースされました。このプラットフォームの最大の特徴は、Jupyter Notebookから直接、コードやその実行結果、書式付きテキストなどを含むブログ投稿を簡単に作成できる点にあります。具体的には、Altairで作成したインタラクティブな可視化をそのまま記事内で動作させることや、コードセルの入力・出力の表示/非表示の設定、デフォルトで開閉可能な折りたたみコードセルの利用、特別なマークダウンセルによるタイトルや要約などのメタデータ定義、さらにはColabやGitHubへのリンクの自動追加など、研究者や技術者に役立つ機能を多数備えています。
さらに、Jupyter Notebookだけでなく、Microsoft Word文書からの投稿作成や、GitHub組み込みのマークダウンエディタによるオンライン編集、TwitterカードやYouTube動画の埋め込み、ユーザー提供のタグによる投稿の分類など、多様な執筆方法とコンテンツ拡張をサポートしています。
技術的な基盤として、fastpagesはホスティングにGitHub Pagesを、ブログの自動構築にGitHub Actionsを利用しています。セットアップは約3分で完了し、特別な技術的知識は不要です。ユーザーは、Jupyter Notebook、Word文書、マークダウンファイルを所定のディレクトリに保存するだけで、後の変換プロセスはすべて自動化されています。この自動化により、手動でのスクリプト操作は一切必要ありません。
以前、fast.aiからはより簡易な設定が可能な「fast_template」も公開されていました。しかし、fast_templateはWordやJupyter Notebookからの自動投稿作成や、上述した多くの高度な機能をサポートしていません。そのため、柔軟性と拡張性に優れるfastpagesの使用が推奨されています。fast_templateは、技術的知識が全くなく、GitHubのオンラインエディタのみで投稿を作成するユーザーに向けた選択肢と言えます。
fastpagesのセットアッププロセス自体もGitHub Actionsによって自動化されています。テンプレートからリポジトリを作成すると、約30秒後に設定を完了させるプルリクエストが自動的に開かれ、そこに記載された指示に従うだけで新しいブログサイトがすぐに運用開始できます。
今回の記事では主にJupyter Notebook向けの機能に焦点が当てられていますが、fastpagesではWord文書やマークダウンを用いた投稿も可能であり、多くの機能を共通して利用できます。投稿の最初のセル(またはファイルの先頭)にはフロントマター(メタデータ)を記述し、各種機能のオン/オフや設定を制御する仕組みとなっています。
総じて、fastpagesは、特にJupyter Notebookを日常的に利用するデータサイエンティストや研究者、教育者が、技術的な負荷を最小限に抑えながらリッチなコンテンツのブログを迅速に立ち上げ、維持することを強力に支援するプラットフォームです。
原文を表示
Jupyter Notebooks & Fastpages Options via FrontMatter
Other Features GitHub Flavored Emojis
How fastpages Converts Notebooks to Blog Posts
We are very pleased to announce the immediate availability of fastpages. fastpages is a platform which allows you to create and host a blog for free, with no ads and many useful features, such as:
Create posts containing code, outputs of code (which can be interactive), formatted text, etc directly from Jupyter Notebooks; for instance see this great example post from Scott Hawley. Notebook posts support features such as: Interactive visualizations made with Altair remain interactive.
Hide or show cell input and output.
Collapsable code cells that are either open or closed by default.
Define the Title, Summary and other metadata via a special markdown cells
Ability to add links to Colab and GitHub automatically.
Create posts, including formatting and images, directly from Microsoft Word documents.
Create and edit Markdown posts entirely online using GitHub's built-in markdown editor.
Embed Twitter cards and YouTube videos.
Categorization of blog posts by user-supplied tags for discoverability.
fastpages relies on Github pages for hosting, and Github Actions to automate the creation of your blog. The setup takes around three minutes, and does not require any technical knowledge or expertise. Due to built-in automation of fastpages, you don't have to fuss with conversion scripts. All you have to do is save your Jupyter notebook, Word document or markdown file into a specified directory and the rest happens automatically. Infact, this blog post is written in a Jupyter notebook, which you can see with the "View on GitHub" link above.
fast.ai have previously released a similar project called fast_template, which is even easier to set up, but does not support automatic creation of posts from Microsoft Word or Jupyter notebooks, including many of the features outlined above.
Because fastpages is more flexible and extensible, we recommend using it where possible. fast_template may be a better option for getting folks blogging who have no technical expertise at all, and will only be creating posts using Github's integrated online editor.
The setup process of fastpages is automated with GitHub Actions, too! Upon creating a repo from the fastpages template, a pull request will automatically be opened (after ~ 30 seconds) configuring your blog so it can start working. The automated pull request will greet you with instructions like this:
All you have to do is follow these instructions (in the PR you receive) and your new blogging site will be up and running!
In this post, we will cover special features that fastpages provides for Jupyter notebooks. You can also write your blog posts with Word documents or markdown in fastpages, which contain many, but not all the same features.
The first cell in your Jupyter Notebook or markdown blog post contains front matter. Front matter is metadata that can turn on/off options in your Notebook. It is formatted like this:
Title > Awesome summary - toc:true- branch: master - badges: true - comments: true - author: Hamel Husain & Jeremy Howard - categories: [fastpages, jupyter] All of the above settings are enabled in this post, so you can see what they look like!
the summary field (preceeded by >) will be displayed under your title, and will also be used by social media to display as the description of your page.
toc: setting this to true will automatically generate a table of contents
badges: setting this to true will display Google Colab and GitHub links on your blog post.
comments: setting this to true will enable comments. See these instructions for more details.
author this will display the authors names.
categories will allow your post to be categorized on a "Tags" page, where readers can browse your post by categories.
Markdown front matter is formatted similarly to notebooks. The differences between the two can be viewed on the fastpages README.
put a #collapse-hide flag at the top of any cell if you want to hide that cell by default, but give the reader the option to show it:
import pandas as pd import altair as alt put a #collapse-show flag at the top of any cell if you want to show that cell by default, but give the reader the option to hide it:
cars = 'https://vega.github.io/vega-datasets/data/cars.json' movies = 'https://vega.github.io/vega-datasets/data/movies.json' sp500 = 'https://vega.github.io/vega-datasets/data/sp500.csv' stocks = 'https://vega.github.io/vega-datasets/data/stocks.csv' flights = 'https://vega.github.io/vega-datasets/data/flights-5k.json' If you want to completely hide cells (not just collapse them), read these instructions.
Interactive visualizations made with Altair remain interactive!
We leave this below cell unhidden so you can enjoy a preview of syntax highlighting in fastpages, which uses the Dracula theme.
label = alt.selection_single( encodings=['x'], # limit selection to
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み