개발(Web)/VCS

[Git/GitHub] Jekyll 기반의 GitHub Page 생성(6) - Google Search Console 활용

shinyelee 2021. 3. 15. 16:06

robots.txt

blogmaker 하위에 robots.txt 생성
아래 코드 복붙

User-agent: *
Allow: /

Sitemap: https://유저명.github.io/sitemap.xml

sitemap.xml

blogmaker 하위에 sitemap.xml 생성
아래 코드 복붙

---
layout: null
---

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
        xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    {% for post in site.posts %}
    <url>
        <loc>{{ site.url }}{{ post.url }}.html</loc>
        {% if post.lastmod == null %}
        <lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
        {% else %}
        <lastmod>{{ post.lastmod | date_to_xmlschema }}</lastmod>
        {% endif %}

        {% if post.sitemap.changefreq == null %}
        <changefreq>weekly</changefreq>
        {% else %}
        <changefreq>{{ post.sitemap.changefreq }}</changefreq>
        {% endif %}

        {% if post.sitemap.priority == null %}
        <priority>0.5</priority>
        {% else %}
        <priority>{{ post.sitemap.priority }}</priority>
        {% endif %}

    </url>
    {% endfor %}
</urlset>

Google Search Console

 

Google Search Console

하나의 계정으로 모든 Google 서비스를 로그인하여 Google Search Console로 이동

accounts.google.com

구글 계정 로그인 → URL 입력 → 계속
html 파일 다운로드 후 아직 확인은 누르지 말 것
왜인지는 모르지만 blogmaker에서는 안 먹힘. [GitHubPage]에 다운 받은 html 파일 복붙
깃허브에 푸시한 후 이제 확인
완료
이제 메인에서 왼쪽 탭의
속성 검색
내 깃허브 블로그가 등록돼 있음
역시 왼쪽 탭에서 Sitemaps 선택 후
sitemap.xml 입력 후 제출
확인
확인

 

출처 : 

 

Google 검색 엔진과 애널리틱스 등록하기

Google 검색 엔진인 Google Search Console과 웹분석 도구인 Google Analytics를 등록해보자.

devinlife.com

 

구글 사이트 등록하기 (Google 검색노출)

Google 서치 콘솔(Search Console)을 사용해 내 사이트의 검색 트래픽 및 실적을 측정하고, 문제를 해결하며, Google 검색결과에서 내 사이트가 돋보이게 할 수

imweb.me

 

Jekyll 기반의 GitHub Page 생성(6) - Google Search Console 활용

Jekyll 기반의 GitHub Page 생성은 여러 절로 구성되어 있습니다. Jekyll 기반의 GitHub Page 생성(1) - 환경설정 Jekyll 기반의 GitHub Page 생성(2) - 블로그 수정 & Publishing Jekyll 기반의 GitHub Page 생성(3) - 웹 폰트

moon9342.github.io

반응형