Skip to content

Commit

Permalink
test reinit
Browse files Browse the repository at this point in the history
  • Loading branch information
warmhug committed Jun 4, 2024
0 parents commit 791b8cc
Show file tree
Hide file tree
Showing 99 changed files with 4,987 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
*.iml
*.log
.idea/
.ipr
.iws
*~
~*
*.diff
*.patch
*.bak
.DS_Store
Thumbs.db
.project
.*proj
.svn/
*.swp
*.swo
*.pyc
*.pyo
.build
node_modules
_site
.cache

Gemfile.lock
.sass-cache
.jekyll-cache
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

source "https://rubygems.org"
gemspec

gem "webrick", "~> 1.7"
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 主页

## 查看

[http://warmhug.github.io/](http://warmhug.github.io/)

### tips

- 文件名不要以下划线开始,不然访问不到
- 文件名不要包含单双引号,空格
- 文件内容,不能包含**下划线**

jekyll用了 liquid 作为模板,{{、}}、{%、%}等可能做了liquid的模板语言标记 被解析掉。若要显示这些,用

```text
{% raw %}
...lots of liquid code goes here and it doesn't get interpreted...
{% endraw %}
```

### jekyll 本地服务器调试

```sh
# 安装 https://jekyllrb.com/docs/
jekyll serve # http://localhost:4000/index.html
jekyll serve --host 0.0.0.0 # http://ip:4000/index.html
```

---

- 使用 https://github.com/allejo/jekyll-tochttps://github.com/toshimaru/jekyll-toc

---

皮肤 https://jekyll-themes.com/minima-reboot/

`_includes/head.html` 里的 `{% seo %}` 报错,可加入以下 Google 统计代码

```text
{% if jekyll.environment == 'production' and site.google_analytics %}
{% include google-analytics.html %}
{% endif %}
```

index.md 里原来的 post 代码

```text
<!-- {% for post in site.posts limit:10 %} -->
```

### 其他

需要 assets 文件夹引用 _sass 里的文件 https://jekyllrb.com/docs/assets/
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'bundler/gem_tasks'
50 changes: 50 additions & 0 deletions __about-me.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
layout: default
title: 关于我
permalink: /about
---

<style>
ul { padding: 8px 16px; }
ul li { padding-top: 2px; }
table tbody tr {
border-top: 1px solid gray;
}
table, th, td {
padding: 8px;
}
</style>

<div style="margin: 18px 0 -3px;">
<strong>重要经历</strong>
</div>

- 2022-2024: 字节跳动-基础架构-APM
- 前端监控平台 Slardar web 业务和产品研发的owner。后端监控平台 Argos 报警业务的前端负责人。ref [字节监控之旅](https://warmhug.github.io/2024/02/15/bytedance-monitor-journey.html)
- 负责产品全链路 “用户体验(oncall/docs)、重点业务线bp、研发管理(周会协同/需求进展)、新功能的设计和开发、竞品调研和年度规划” 工作。
- 加强 [E2E测试](https://warmhug.github.io/2023/12/23/e2e-test-experience.html)(英语分享),技改优化。
- 2019-2022: 阿里云-GTS交付部门
- 参与 GTS交付平台/数字化工作台(飞天技术服务平台) 0-1 的过程,团队内最早的前端开发。
- 前期负责前端整体,后续负责平台上“[架构图设计器](https://warmhug.github.io/2020/08/07/architecture-diagram-builder.html)[周日报](https://warmhug.github.io/2021/11/05/worklog.html)(一个场景化的在线文档产品)、文档管理、我的日历”等富交互生产力产品模块的开发。
- 2014-2019: 支付宝-体验技术部 (蚂蚁集团)
- [Ant Design](https://ant.design/) 最早的两个组件 Menu/Select 以及 Tree 等组件开发者。(2014/12/31_23:00 还在改代码!)
- [Ant Design Mobile](https://mobile.ant.design/) 第一代负责人和最核心开发者,负责 0.x / 1.x / 2.x 版本全过程。
- 参与最早期的“蚂蚁小程序”建设,参与蚂蚁小程序第一个试点项目“ofo小程序”的开发。
- 参与蚂蚁 “网商银行、金融云” 等超大型项目 0-1 的阶段。参与支付宝APP内多个产品的开发。
- 2012/1-2013/12: 实习、毕业、工作第一年
- 2008/9-2012/6: college(浙江某二本), 团购网/校园生活网 ("百团大战"时期)
- 非计算机专业、大二开始自学.net/js做网站、校园创业 谈20+家广告 赚一点钱。
- born-2008: 中华民族的发源地

<div style="margin: 12px 0">
<strong>结构化总结</strong>
</div>

| 时间\维度 | 技术 | 业务 | 综合 |
| :--: | :--:| :--: | :--: |
| 2012-2018 | 点和线: h5页面 中后台页面 组件库 | c端 b端 业务支撑 | 编程能力 开源(质量) 工程化 |
| 2019-2022 | 面: 技术大图 业务架构 | 业务模块owner 难点攻坚 | 独立负责 全链路 规划 合作和责任 成事 |
| 2022-至今 | 面和网: 技术规划 竞品调研 技术前瞻性 后端技术 | 整个业务owner 业务规划 业务价值 | 跨国合作 突破瓶颈 抗压 管理和协作 |

<br>
<br>
17 changes: 17 additions & 0 deletions __collections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: default
title: 摘记
permalink: /collections
---

<h2>{{ page.title }} ({{ site.collections | size }} 篇)</h2>

<ul class="list-unstyled" id="collectList">
{% assign collections = site.collections | sort: "order" %}
{% for item in collections %}
<li><a href="{{ item.url }}">{{ item.title }}</a></li>
<!-- <li>{{ item.content | markdownify }}</li> -->
{% endfor %}
</ul>

<small class="text-secondary">如摘录内容有侵权、联系我邮箱</small>
18 changes: 18 additions & 0 deletions __posts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: default
title: 随笔
permalink: /posts
---

<h2>{{ page.title }} ({{ site.posts | size }} 篇)</h2>

<div class="mb-4 mt-4" id="postNav">
<a class="btn btn-sm btn-primary" href="#" role="button">全部</a>
{% for tag in site.tags %}
<a class="btn btn-sm btn-light" href="#" role="button" href='#{{ tag[0] | escape }}'>{{ tag[0] }}</a>
{% endfor %}
</div>

<ul class="list-unstyled" id="postList"></ul>

{% include api-posts.html %}
8 changes: 8 additions & 0 deletions _collections/-.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: collections
title: 焦点
order: 0
permalink: /collections/focus
---

收集
7 changes: 7 additions & 0 deletions _collections/misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: collections
title: my-archive
order: 1
---

收集
33 changes: 33 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
title: Warmhug
author: warmhug
email: [email protected]
github: https://github.com/warmhug

head_inline: "<style>td:first-child { width: 7rem; }</style>"

port: 4000
baseurl: /
url: http://localhost:4000

source: .
destination: ./_site
include: ["__*md"]

markdown: kramdown
# highlighter: 'pygments'
paginate: 15
paginate_path: "/page:num/"

collections:
collections:
output: true

plugins:
- jekyll-seo-tag
- jekyll-paginate
- jekyll-feed
- jekyll-redirect-from

exclude:
- Gemfile
- Gemfile.lock
60 changes: 60 additions & 0 deletions _includes/api-posts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<script>
const postRawData = [
{% for post in site.posts %}
{
date: '{{ post.date | date: "%F" }}',
title: '{{ post.title | escape }}',
tags: '{{ post.tags | escape }}',
url: '{{ post.url }}',
slug: '{{ post.slug }}'
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
];

const postData = {};
postRawData.forEach(item => {
JSON.parse(item.tags.replace(/&quot;/g, '"')).forEach(tag => {
if (!postData[tag]) {
postData[tag] = [];
}
postData[tag].push(item);
});
});
// console.log('pd', postData);

const navNode = document.querySelector('#postNav')
const listNode = document.querySelector('#postList');
const renderItem = post => `<li><span>${post.date}</span> &raquo; <a href="${post.url}">${post.title}</a></li>`;
const activeNav = (nodeText) => {
navNode.querySelectorAll('.btn').forEach(ele => {
if (ele.innerHTML === nodeText) {
ele.classList.remove('btn-light');
ele.classList.add('btn-primary');
} else {
ele.classList.remove('btn-primary');
ele.classList.add('btn-light');
}
});
};
const hash = location.hash.replace('#', '');
if (postData[hash]) {
listNode.innerHTML = postData[hash].map(renderItem).join('');
activeNav(hash);
} else {
listNode.innerHTML = postRawData.map(renderItem).join('');
}
navNode.addEventListener('click', (evt) => {
// console.log('tar', evt.target.tagName);
if (evt.target.tagName !== 'A') {
return;
}
const targetData = postData[evt.target.innerHTML];
if (targetData) {
listNode.innerHTML = targetData.map(renderItem).join('');
} else {
listNode.innerHTML = postRawData.map(renderItem).join('');
}
activeNav(evt.target.innerHTML);
})
</script>
41 changes: 41 additions & 0 deletions _includes/disqus_comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% if page.comments != false and jekyll.environment == "production" %}
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '{{ page.url | absolute_url }}';
this.page.identifier = '{{ page.url | absolute_url }}';
};

(function() {
var d = document, s = d.createElement('script');

s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';

s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{% endif %}


<!--
<div id="comments">
<h3>Comments</h3>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'warmhug'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
// dsq.src = 'https://os.alipayobjects.com/rmsportal/fMJXUMYSzNyUDWB.js'; // embed.js
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
-->
48 changes: 48 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<footer id="site-footer">
<div class="container">
<div class="h5 pt-4">
Warmhug's blog
{% if site.plugins contains "jekyll-feed" %}
<a id="rss-icon" href="{{ "/feed.xml" | relative_url }}"></a>
{% endif %}
</div>
<div class="row">
<div class="col col-lg-6">
<ul class="list-unstyled">
<li class="text-secondary">
<a href="{{ site.github }}" target="_blank">
<div id="github-icon"></div>
{{ site.author | escape }}
</a>
<span class="m-1">|</span>
{% if site.email %}
<a href="mailto:{{ site.email }}">{{ site.email }}</a>
{% endif %}
</li>
<li>
<small class="text-secondary text-justify">
技术<strong>成长</strong>
工作<strong>感悟</strong>
教训<strong>反思</strong>
</small>
</li>
</ul>
</div>
<div class="col-12 col-lg">
<small>
<strong>
I hear and I forget. &nbsp;&nbsp;
I see and I remember. &nbsp;&nbsp;
I do and I understand.
</strong>
<br />
<mark>Love</mark> ends when you stop caring. &nbsp;&nbsp;
<mark>Friendship</mark> ends when you stop sharing.
<br />
<mark>Life</mark> stops when you stop dreaming. &nbsp;&nbsp;
<mark>Hope</mark> ends when you stop believing.
</small>
</div>
</div>
</div>
</footer>
9 changes: 9 additions & 0 deletions _includes/google-analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
window['ga-disable-{{ site.google_analytics }}'] = window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1";
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{{ site.google_analytics }}');
</script>
Loading

0 comments on commit 791b8cc

Please sign in to comment.