Git Product home page Git Product logo

blog-source's Introduction

project

hexo 설치

hexo 명령어를 global로 사용할 수 있도록 -g 옵션으로 설치

npm install -g hexo-cli

project 구조

- scaffolds : layout의 기반 구조 (post, page, draft 등)
- themes : [base theme](https://github.com/Kaijun/hexo-theme-huxblog.git)
- source : 소스 폴더
    - img : 공통으로 사용하는 이미지
    - _post : post 소스 폴더

writing

hexo new 명령어로 새로운 포스팅 폴더를 만든다. 새롭게 생성한 post는 source/_posts 폴더에 저장된다.

hexo new [layout] <title>
(ex) hexo new post my-first-post

별도의 placeholder를 사용하지 않고 파일명(폴더명)이 url의 directory가 되도록 -(dash)로 띄어쓰기를 구분한다.

url 체계
/{year}/{month}/{day}/{title}

(ex)
title: this-is-my-first-post
=> https://blueshow.github.io/2018/01/15/this-is-my-first-post

이미지 삽입하기 hexo new 커맨드로 만들어진 post 파일과 동일한 이름의 폴더에 image를 넣고 아래 코드를 삽입한다.

{% asset_img filename.png %}

test

로컬환경에서 실행하기

hexo server

기본 테스트 페이지

http://localhost:4000

generating & deploy

정적파일을 생성(generate)하고 blueshw.github.io 레파지토리에 배포(deploy)한다. 레파지토리 정보는 _config.yml을 참조한다.

hexo generate
hexo generate --watch
hexo deploy --generate (생성 + 배포)

blog-source's People

Contributors

dev-bono avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.