LoginSignup
2
3

More than 1 year has passed since last update.

HTMLでWebサイトを公開する

Last updated at Posted at 2023-01-30

概要

GitHub Pagesという無料のサービスを利用して、HTMLでサイトを公開するための手順を説明。

手順

1. GitHubアカウント作成

GitHubサイト右上のサインアップをクリック
github1.png
Username / Email address / Passwordを入力し、Create accountをクリック
github2.jpeg

2. リポジトリ作成

GitHubログイン後、+ボタン→New repositoryからリポジトリを作成。
github3.png
Repository nameをアカウント名.github.io、公開設定をPublicにして、Create Repositoryをクリック。
github.png

3. HTMLファイルのアップロード

2で作成したリポジトリから、Add file→Create new fileでファイル作成ページに移動。
スクリーンショット 2023-01-30 140407.png
ファイル名をindex.html、Edit new fileに中身を記述。
スクリーンショット 2023-01-30 140650.png

index.html
<html>
    <head>
        <meta charset="utf-8">
        <title>タイトル</title>
    </head>
    <body>
        本文
    </body>
</html>

4. 公開設定

リポジトリ→Settings→Pagesで、Your site is live at https://[アカウント名].github.io/と表示されているか確認。このURLが公開サイトとなっている。
github4.png

エディタ

Windowsデフォルトのメモ帳アプリでも編集可能だが、VSCodeがおすすめ。Microsoft社が提供する無償のコードエディタ。
以下のサイトからダウンロード可能。

VSCodeの特徴としては以下の通り。

  • エディタ画面が見やすい
  • プレビュー表示機能あり
  • GUI形式のGit操作
2
3
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
3