Giter Site home page Giter Site logo

tech-blog's Introduction

service stack

  • ホスティング : Github Pages
  • 静的サイトジェネレータ:Hexo
  • 分析:Google Analytics

ユーザプロフィールを追加する方法

  • _profile.yml に追加

setup

SNSカウントを表示させるために、Facebook開発者用のトークンが必要

  1. Facebook開発者キーが必要
  2. アクセストークンを取得
  3. アクセストークンが正常か確認 https://graph.facebook.com?id=https%3A%2F%2Ffuture-architect.github.io%2Farticles%2F20210313%2F&fields=engagement&access_token=xxx|xxx
  4. 環境変数に設定
    • export FB_TOKEN=xxx|xxx

Google Analytics

人気の記事を表示させるためGOOGLE_APPLICATION_CREDENTIALSが必要

set GOOGLE_APPLICATION_CREDENTIALS キーパス

View local server

$ cd ../
$ git clone --depth 1 https://github.com/future-architect/tech-blog.git
$ cd tech-blog
$ npm install

$ node_modules\.bin\hexo server
 --> http://localhost:4000 にページが表示されたら完了

Deploy

cd ../
git clone --depth 1 https://github.com/future-architect/future-architect.github.io

# Windows Only
cd tech-blog
mklink /J public ..\future-architect.github.io

node_modules\.bin\hexo generate
cd public
git add .
git commit -m "<message>"
git push origin HEAD

SNSカウントの更新

# インストール
go install github.com/ma91n/snssharecount/cmd/snssharecount@latest
go install github.com/ma91n/snssharecount/cmd/ga@latest

実行

# 実行
set http_proxy=<proxy url>
set https_proxy=<proxy url>

snssharecount > temp.json
mv temp.json sns_count_cache.json

ga > ga_cache.json

画像圧縮

pngquantをインストールする

# ディレクトリ横断
pngquant */*.png --skip-if-larger --ext .png --force

# 特定ディレクトリ配下
pngquant *.png --skip-if-larger --ext .png --force

jpegoptimをインストールする https://github.com/XhmikosR/jpegoptim-windows/releases/

# jpegoptimに再帰的オプションがなかったためbatファイルでラップした
# 月次で実行する
jpegoptimall.bat

textlint

Installation

> npm install textlint --global
> npm install textlint-rule-preset-ja-technical-writing --global
> npm install textlint-rule-spellcheck-tech-word --global

Lint

> textlint source/_posts

tech-blog's People

Contributors

ma91n avatar future-mano avatar dependabot[bot] avatar kaedemalu avatar shibukawa avatar orangekame3 avatar d-tsuji avatar maito1201 avatar montblanc18 avatar mura123yasu avatar tanzaku avatar naoyukis avatar fa-yuto-nagai avatar orisano avatar yu1ro5 avatar tng527 avatar ftnext avatar future-watanabe avatar future-ito-masahiko avatar syohex avatar futurearchitect-kishishita avatar ymaegawa avatar sadayuki-matsuno avatar kuriki-at-future avatar hanbintk avatar future-haraki avatar fc-saanai avatar yut0naga1 avatar yut0n avatar ota-meshi 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.