2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Sapper】マークダウンBlogテンプレートを使ってNetlifyデプロイ

Last updated at Posted at 2020-09-12

動作環境

% node -v
v12.18.3
% npm -v
6.14.6

1.テンプレート

GitHubで見つけた*『sapper-blog-template』*を使用させてもらいました。

DEMO | GitHub

sapperqiita00.png

ヘッダーのメニューからHome、About、Blogに遷移、Blog記事はマークダウンで作成する比較的シンプルなマークダウンブログのサイトです。Gatsbyと比べてSapper(svelte.js)は100%理解していなくても直感的にカスタムできる印象です。

2.GetStart

README通りターミナルでコマンドを実行。

npx degit Charca/sapper-blog-template my-blog
cd my-blog
npm install # or yarn!
npm run dev

もしくはUse this templateからリポジトリを作ってcloneする。
sapperqiita01.jpg
clone出来たらREADMEと同じく、

npm i
npm run dev

これでlocalhost:3000で確認出来ます。

3.Netlify設定

基本的なNetlifyの使い方は割愛しますが、
毎回*『Deploy settings』*の設定がわからなくなるのでメモ。

Build settingとPublish directoryの項目を入力。
✳︎ __sapper__/export("sapper"前後それぞれアンダーバーを2つ)
sapperqiita02.jpg

4.LightHouseで確認

sapperqiita03.png

今回作ったDemoサイト

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?