Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest.jsonの作成 #460

Merged
merged 6 commits into from
May 19, 2018
Merged

Manifest.jsonの作成 #460

merged 6 commits into from
May 19, 2018

Conversation

nissy-dev
Copy link
Contributor

@nissy-dev nissy-dev commented May 15, 2018

Related #431

Manifest.jsonを作成しました

未着手

  • Manifest.json用のIcon作成 feat(website): add icon and favicon #464
    Iconは、どうすれば良いかわからなかったので、教えていただけると助かります 🙇
    (とりあえず, 仮のものをおいておきました)

@nissy-dev nissy-dev changed the title feat: create manifest.json Manifest.jsonの作成 May 15, 2018
@bot-user
Copy link

bot-user commented May 15, 2018

Deploy preview for js-primer ready!

Built with commit 93c95b0

https://deploy-preview-460--js-primer.netlify.com

@@ -31,4 +31,5 @@
margin-bottom: 1.275em
}
</style>
<link rel="manifest" href="./manifest.json">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらも同じように /manifest.json じゃないとページによってはアクセスできない気がします。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しました!

"name": "JavaScriptの入門書",
"start_url": "https://asciidwango.github.io/js-primer/",
"icons": [
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

アイコンまだ特にないんですよね。
てきとうに文字だけのアイコンを作って置くとかがいいのかなー。
(add to homescreenすると多分リクエストが飛んで404になるので)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

了解です 🙆‍♂️

@azu
Copy link
Collaborator

azu commented May 15, 2018

image
(start_urlがwarningなのはnetlify上だから)

ChromeのApplicationタブでmanifest.jsonを読めるのを確認しました。
やっぱりiconのURLに実在するものがないとAdd to homescreen自体がエラーになるっぽいですね。
仮でなにか置くか、空にしないとダメか(スクショになる)

@nissy-dev
Copy link
Contributor Author

なるほど...

個人的には, 特にこだわり等なければ,

文字だけのアイコンを作って置く

でとりあえずwork around的に解決でいいと思います

@azu
Copy link
Collaborator

azu commented May 16, 2018

  • 適当なアイコンを作ってからマージする

@@ -31,5 +31,6 @@
margin-bottom: 1.275em
}
</style>
<link rel="manifest" href="/manifest.json">
Copy link
Collaborator

@azu azu May 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

などで / が指す場所がことなるため

"{{ "/"|resolveFile }}/manifest.json"

のように書いて相対パスに変換しないとダメでした。 🙇

<link rel="manifest" href="{{ "/"|resolveFile }}/manifest.json">

参考

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確かに、そこの対応は必要そうですね...
今、 https://asciidwango.github.io/js-primer/ の方で確認してみたら、
この記述でも以下のエラーが出ています...

2018-05-17 10 09 26

僕の方でも少し確認してみます 🙇

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<script type="text/javascript" src="{{ "/"|resolveFile }}/sw-register.js"></script>
https://asciidwango.github.io/js-primer/.sw-register.js になってしまうのか。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<script type="text/javascript" src="{{ "/sw-register.js"|resolveFile }}"></script> が正解な気がしてきました。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<link rel="manifest" href="{{ "/manifest.json"|resolveFile }}">
が正解だったようです。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

了解しました 👍

@azu
Copy link
Collaborator

azu commented May 19, 2018

とりあえず適当にアイコンをつくったのでマージします。
(後で入れておきます。)

image

@azu azu merged commit 437b884 into asciidwango:master May 19, 2018
@nissy-dev
Copy link
Contributor Author

ありがとうございます 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants