NyangPolice's homepage

Bookmark this to keep an eye on my project updates!

View on GitHub

AGENT.MD: nyang-police.github.io 블로그 작성/구조 가이드

🧭 목적

이 파일은 nyang-police.github.io Jekyll 블로그의 구조와 글 작성 방법을 정리한 문서입니다.


📁 프로젝트 주요 구조


⚙️ _config.yml 핵심 설정


✍️ 글 작성 규칙

1) 파일 경로

_posts/<category>/<YYYY-MM-DD>-<slug>.md

2) frontmatter 필수 예시

---
layout: post
title: "예시 제목"
date: 2026-03-20
author: NyangPolice
category: python
tags: [python, 예제, 입문]
---

3) 필드 설명

4) 콘텐츠 구조 통계


🔧 Pyodide 인터랙티브 코드 삽입

1. frontmatter

pyodide: true

2. 에디터 컴포넌트 포함






<div class="pyodide-block">
    <div class="pyodide-header">
        <span class="pyodide-lang" id="title-1" data-original-title="필요 시 제목">필요 시 제목</span>
        <span class="pyodide-status" id="status-1"></span>
    </div>
    <textarea class="pyodide-code" id="code-1"></textarea>
    <div class="pyodide-controls">
        <button class="pyodide-run-btn"
            onclick="runCode('code-1', 'output-1', 'status-1')">
            ▶ Run
        </button>
        <button class="pyodide-reset-btn" onclick="resetCode('code-1', 'pycode-1')">
            ↺ Reset
        </button>
    </div>
    <textarea class="pyodide-output" id="output-1" readonly>아직 실행되지 않았습니다. ▶ Run을 눌러보세요.</textarea>
    <div class="pyodide-plot" id="plot-1"></div>
</div>

<script>
    document.addEventListener('DOMContentLoaded', function () {
        var src = document.getElementById('pycode-1');
        var ta = document.getElementById('code-1');
        if (src && ta) {
            ta.value = src.textContent.replace(/^\n/, '');
        }
    });
</script>

3. 초기 코드 삽입

<script type="text/plain" id="pycode-1">
print("Hello, World!")
</script>

🧩 레이아웃/포스트 페이지 동작 요약


▶ 로컬 개발 서버

  1. chmod +x scripts/setup-jekyll.sh
  2. ./scripts/setup-jekyll.sh
  3. source ~/.bashrc
  4. bundle exec jekyll serve
  5. 브라우저에서 http://localhost:4000

포트 충돌 시: bundle exec jekyll serve --port 4001


📦 배포 확인


💡 추가 팁


📌 요약