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

fix : 코드블록 테마 변경 #155

Open
wants to merge 8 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 2 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
# NexT
# Dok6n's blog

> 精于心,简于形

NexT 是由 [Hexo NexT](https://github.com/iissnan/hexo-theme-next) 移植而来的 Jekyll 主题。<!--commit: f951075d9b739d26b42472431995fa68d08796aa-->

<a href="http://simpleyyt.github.io/jekyll-theme-next/" target="_blank">在线预览 Preview</a> | <a href="http://simpleyyt.com" target="_blank">Yitao's Blog</a> | <a href="http://theme-next.simpleyyt.com" target="_blank">NexT 使用文档</a> | [English Documentation](README.en.md)

[![Join the chat at https://gitter.im/simpleyyt/jekyll-theme-next](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jekyll-theme-next/lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

![NexT Schemes](http://iissnan.com/nexus/next/next-schemes.jpg)


## 浏览器支持 Browser support

![Browser support](http://iissnan.com/nexus/next/browser-support.png)


## 贡献 Contributing

欢迎提交问题与需求,修复代码。


## 开发 Development

NexT 主旨在于简洁优雅且易于使用,所以首先要尽量确保 NexT 的简洁易用性。

NexT is built for easily use with elegant appearance. First things first, always keep things simple.


## 捐赠

支付宝捐赠链接还是要有的,万一真的有人捐呢。

![支付宝扫码捐赠](http://7lryc0.com1.z0.glb.clouddn.com/a6x049034plyvjm1rvn4h28%20%281%29.png)
https://dok6n.github.io/
26 changes: 26 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,32 @@ disqus:
# count need to be false when hide is true
hide: false

# <wildfire>
wildfire:
enable: false
# version - It's recommended to use the following versions.
loaderVersion: 1.2.5 # https://www.npmjs.com/package/wildfire-comment
useDev: true
version: 0.5.6
# database config
databaseProvider: firebase # or wilddog
firebase: # your firebase config goes here ↓
apiKey:
authDomain:
databaseURL:
projectId:
storageBucket:
messagingSenderId:
wilddog: # your wilddog config goes here ↓
siteId:
# other configs
theme: light # or dark
locale: en # or other locales, e.g. zh-CN
defaultAvatarURL:
# Any question?
# Raise an issue here: https://github.com/cheng-kang/wildfire/issues
# </wildfire>

# Hypercomments
#hypercomments_id:

Expand Down
10 changes: 10 additions & 0 deletions _includes/_macro/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@
data-disqus-identifier="{{ post.url }}" itemprop="commentCount"></span>
</a>
</span>
{% elsif site.wildfire.enable %}
<span class="post-comments-count">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-comment-o"></i>
</span>
<a href="{{ post.url | relative_url }}#comments" itemprop="discussionUrl">
<span class="post-comments-count wf-count-unit" wf-page-url="{{ post.url | absolute_url }}" itemprop="commentCount"></span>
</a>
</span>
{% elsif site.hypercomments_id %}
<!--noindex-->
<span class="post-comments-count">
Expand Down
2 changes: 2 additions & 0 deletions _includes/_partials/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<div id="lv-container" data-id="city" data-uid="{{ site.livere_uid }}"></div>
{% elsif site.changyan.appid and site.changyan.appkey %}
<div id="SOHUCS"></div>
{% elsif site.wildfire.enable %}
<div class="wildfire_thread"></div>
{% endif %}
</div>
{% endif %}
1 change: 1 addition & 0 deletions _includes/_third-party/comments/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
{% include _third-party/comments/youyan.html %}
{% include _third-party/comments/livere.html %}
{% include _third-party/comments/changyan.html %}
{% include _third-party/comments/wildfire.html %}
44 changes: 44 additions & 0 deletions _includes/_third-party/comments/wildfire.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{% if site.wildfire.enable %}
<script type="text/javascript">
var wildfireConfig = () => ({
{% if site.wildfire.useDev %}
useDev: {{site.wildfire.useDev}},
{% endif %}
{% if site.wildfire.version %}
version: '{{site.wildfire.version}}',
{% endif %}
databaseProvider: '{{site.wildfire.databaseProvider}}',
databaseConfig: {
{% if site.wildfire.databaseProvider == 'firebase' %}
apiKey: '{{site.wildfire.firebase.apiKey}}',
authDomain: '{{site.wildfire.firebase.authDomain}}',
databaseURL: '{{site.wildfire.firebase.databaseURL}}',
projectId: '{{site.wildfire.firebase.projectId}}',
storageBucket: '{{site.wildfire.firebase.storageBucket}}',
messagingSenderId: '{{site.wildfire.firebase.messagingSenderId}}'
{% else %}
siteId: '{{site.wildfire.wilddog.siteId}}'
{% endif %}
},
pageURL: '{{ page.url | absolute_url }}',
pageTitle: '{{ page.title| replace: "'", "\\'" }}',
{% if site.wildfire.theme %}
theme: '{{site.wildfire.theme}}',
{% endif %}
{% if site.wildfire.locale %}
locale: '{{site.wildfire.locale}}',
{% endif %}
{% if site.wildfire.defaultAvatarURL %}
defaultAvatarURL: '{{site.wildfire.defaultAvatarURL}}'
{% endif %}
});
</script>
{% if page.comments %}
{% if site.wildfire.loaderVersion %}
<script src="https://unpkg.com/wildfire-comment@{{site.wildfire.loaderVersion}}"></script>
{% else %}
<script src="https://unpkg.com/wildfire-comment"></script>
{% endif %}
{% endif %}
<script src="https://unpkg.com/wf-count"></script>
{% endif %}
87 changes: 87 additions & 0 deletions _posts/2021-09-19-자바스크립트-런타임-환경.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: 자바스크립트 런타임 환경
description: 테마 적용 후 테스트용 포스팅
categories:
- javascript
tags:
---

> 개발 공부하며 생각나거나 겪었던 이슈들과 참고할 내용들을 적어나갈 블로그 입니다.
<!-- more -->


# 런타임 환경

## **자바스크립트 런타임 환경 ( 엔진 이해, 스택개념 정리 )**

자바스크립트는 싱글 쓰레드 언어

브라우저안에 여러 가지의 쓰레드가 들어 있기때문에 웹 APIs들을 이용하면 멀티쓰레딩이 가능

![런타임환경 힙스택](https://dok6n.github.io/assets/images/javascript-Runtime/runtime01.png)

- Memory Heap
- 데이터를 만들 때 저장되는 공간
- 구조적으로 정리된 자료구조가 아니라 아무곳에서나 저장되어져 있다.
- Call Stack
- LIFO(last in first out) 쌓이는 구조
- 재귀 함수 : 함수안에서 함수 자기자신을 호출
- 프로세스또는 스택 마다 지정된 콜 스택 사이즈가 있어서 콜 스택을 잘못 쓸 경우 지정된 최고 사이즈를 초과하여 에러발생 할 수 있음

## 브라우저 런타임 환경 이해 ( 큐 개념정리 )

Queue
FIFO ( First In First Out ) => ex) add(), remove()

![런타임환경 큐](https://dok6n.github.io/assets/images/javascript-Runtime/runtime02.png)

**웹 API를 사용할때 콜백 함수를 등록 해 놓고,**

**원하는 이벤트가 발생하면 바로 웹 API는 태스크 큐에 우리가 등록한 콜백 함수를 큐 안으로 넣고,**

**이벤트 루프는 빙글빙글 돌면서 콜스택과 태스크 큐를 관찰하는 아이인데,**

**콜 스택이 비워져 있으면 태스크 큐에 있는 아이를 하나만 가지고 와서 콜스택에 넣어준다.**

# **전체적인 흐름**

![런타임 환경 전체](https://dok6n.github.io/assets/images/javascript-Runtime/runtime03.png)

자바스크립트 엔진에는 **`Heap`** 과 **`Call Stack`** 이 있다.

**`Call Stack`** 은 함수가 실행되는 과정을 기억하기 위해서 쓰이는 자료구조이다.

자바스크립트가 동작하는 런타임 환경에서는 **`태스크 큐`** 와 **`마이크로 태스크 큐`** 를 이용해서 **`asynchonous`** , **`비동기`** 적인 처리를 하게 된다.

**`태스크 큐`** 는 한번에 하나씩만 **`Call Stack`** 으로 가지고 온다.

**`마이크로 태스크 큐`** 는 들어 있는 아이들과 새로 추가된 아이들까지 모두 다 수행할 때까지, **`마이크로 태스크 큐`** 가 비어있게 될 때 까지 **`Call Stack`** 으로 가지고 온다.

**`Render`** 는 **`이벤트 루프`** 가 매 번은 아니되 주기적으로 브라우저에게 UI를 업데이트 하기 위해서

자주 자주 들러준다.

호출한 **`리퀘스트 애니메이션 프레임 콜백 큐`** 는 이 업데이트가 일어나기 전에 한번 쭉 순회하면서 코드가 실행이 된다.

[리디아 할리의 시각화 움짤링크](https://dev.to/lydiahallie/series/3341)

![https://res.cloudinary.com/practicaldev/image/fetch/s--44yasyNX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gid1.6.gif](https://res.cloudinary.com/practicaldev/image/fetch/s--44yasyNX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gid1.6.gif)

![https://res.cloudinary.com/practicaldev/image/fetch/s--d_n4m4HH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif2.1.gif](https://res.cloudinary.com/practicaldev/image/fetch/s--d_n4m4HH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif2.1.gif)

![https://res.cloudinary.com/practicaldev/image/fetch/s--MewGMdte--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif3.1.gif](https://res.cloudinary.com/practicaldev/image/fetch/s--MewGMdte--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif3.1.gif)

![https://res.cloudinary.com/practicaldev/image/fetch/s--b2BtLfdz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif4.gif](https://res.cloudinary.com/practicaldev/image/fetch/s--b2BtLfdz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif4.gif)

![https://res.cloudinary.com/practicaldev/image/fetch/s--NYOknEYi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif5.gif](https://res.cloudinary.com/practicaldev/image/fetch/s--NYOknEYi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif5.gif)

```javascript
const foo = () => console.log("First");
const bar = () => setTimeout(() => console.log("Second"), 500);
const baz = () => console.log("Third");
bar();
foo();
baz();
```

![https://res.cloudinary.com/practicaldev/image/fetch/s--BLtCLQcd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif14.1.gif](https://res.cloudinary.com/practicaldev/image/fetch/s--BLtCLQcd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://devtolydiahallie.s3-us-west-1.amazonaws.com/gif14.1.gif)
Binary file added assets/images/javascript-Runtime/runtime01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/javascript-Runtime/runtime02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/javascript-Runtime/runtime03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.