All Projects → HCLonely → hexo-steam-games

HCLonely / hexo-steam-games

Licence: Apache-2.0 license
为Hexo添加Steam游戏库页面

Programming Languages

javascript
184084 projects - #8 most used programming language
EJS
674 projects
CSS
56736 projects

Projects that are alternatives of or similar to hexo-steam-games

hexo-covers
Microbrowser covers for Hexo static site generator
Stars: ✭ 15 (-37.5%)
Mutual labels:  hexo, hexo-plugin
hexo-tag-instagram
Embed instagram photo and movie tag plugin for Hexo.
Stars: ✭ 23 (-4.17%)
Mutual labels:  hexo, hexo-plugin
hexo-tag-xvideos
🔞 Embed xvideos player in your Hexo posts/pages
Stars: ✭ 17 (-29.17%)
Mutual labels:  hexo, hexo-plugin
hexo-tag-hint
A Hexo tag plugin to display text hint/spoiler tooltip.
Stars: ✭ 26 (+8.33%)
Mutual labels:  hexo, hexo-plugin
hexo-hide-posts
A plugin to hide specific posts from your Hexo blog and make them only accessible by links. (隐藏 Hexo 文章)
Stars: ✭ 149 (+520.83%)
Mutual labels:  hexo, hexo-plugin
hexo-include-markdown
Easily load markdownfiles in Markdown .
Stars: ✭ 16 (-33.33%)
Mutual labels:  hexo, hexo-plugin
hexo-douban-card
在hexo文章中插入豆瓣读书,豆瓣电影,豆瓣音乐组件
Stars: ✭ 56 (+133.33%)
Mutual labels:  hexo, hexo-plugin
hexo-instagram-wall
Displays up to 18 most recent images from your Instagram account
Stars: ✭ 12 (-50%)
Mutual labels:  hexo, hexo-plugin
hexo-filter-optimize
A Hexo plugin that optimize the pages loading speed.
Stars: ✭ 41 (+70.83%)
Mutual labels:  hexo, hexo-plugin
hexo-directory-category
Automatically add category to Hexo article according to the article file directory.
Stars: ✭ 35 (+45.83%)
Mutual labels:  hexo, hexo-plugin
hexo-reading-time
Plugin for Hexo CMS to display reading time for article
Stars: ✭ 28 (+16.67%)
Mutual labels:  hexo, hexo-plugin
hexo-filter-mathjax
💯 Server side MathJax renderer plugin for Hexo.
Stars: ✭ 76 (+216.67%)
Mutual labels:  hexo, hexo-plugin
hexo-bilibili-bangumi
hexo 番剧页面插件,可选数据源:Bilibili, Bangumi
Stars: ✭ 252 (+950%)
Mutual labels:  hexo, hexo-plugin
hexo-netlify-cms
☕ A cup of coffee time to enable Netlify CMS
Stars: ✭ 29 (+20.83%)
Mutual labels:  hexo, hexo-plugin
hexo-filter-plantuml
Using PlantUML to generate UML Diagram for hexo
Stars: ✭ 23 (-4.17%)
Mutual labels:  hexo, hexo-plugin
awesome-next
😎 Theme NexT, AWESOME NexT!
Stars: ✭ 47 (+95.83%)
Mutual labels:  hexo
hexo-theme-yilia-l
简洁优雅的hexo博客主题
Stars: ✭ 24 (+0%)
Mutual labels:  hexo
notion-down
Notion >> Markdown. Python utility that converts Notion pages into MD files, along with intergation to build static webpages such as Hexo | 自动从 Notion 笔记生成 MD 文件,并部署到 Hexo 静态博客 | Notion Pages より Markdown Files をコンバートする、更に Hexo Webpages までの自動化も可能
Stars: ✭ 81 (+237.5%)
Mutual labels:  hexo
hexon
Let's hexo online.
Stars: ✭ 28 (+16.67%)
Mutual labels:  hexo
hexo-theme-icalm
Monochrome theme for hexo
Stars: ✭ 121 (+404.17%)
Mutual labels:  hexo

hexo-steam-games

介绍

为Hexo添加Steam游戏库页面.

Demo

安装

$ npm install hexo-steam-games --save

配置

将下面的配置写入站点的配置文件 _config.yml 里(不是主题的配置文件).

steam:
  enable: true
  steamId: '*****' #steam 64位Id
  path:
  title: Steam游戏库
  quote: '+1+1+1+1+1'
  tab: recent
  length: 1000
  imgUrl: '*****'
  proxy:
    host:
    port:
  extra_options:
    key: value
  • enable: 是否启用
  • steamId: steam 64位Id(需要放在引号里面,不然会有BUG), 需要将steam库设置为公开!
  • path: 番剧页面路径,默认steamgames/index.html
  • title: 该页面的标题
  • quote: 写在页面开头的一段话,支持html语法
  • tab: allrecent, all: 所有游戏, recent: 最近游玩的游戏
  • length: 要显示游戏的数量,游戏太多的话可以限制一下
  • imgUrl: 图片链接,在quote下面放一张图片,图片链接到Steam个人资料,可留空
  • proxy: 如果无法访问steam社区的话请使用代理
    • host: 代理ip或域名
    • port: 代理端口
  • extra_options: 此配置会扩展到Hexo的page变量中

使用

  1. hexo generatehexo deploy之前使用hexo steam -u命令更新steam游戏库数据!
  2. 删除游戏库数据指令:hexo steam -d

手动获取游戏库数据

如果hexo steam -u命令一直获取游戏库数据失败,可以用一下方法手动获取游戏库数据:

  1. 浏览器打开https://steamcommunity.com/profiles/{steamId}/games?tab={tab}, {steamId}{tab}分别替换为上面配置中提到的steamIdtab

  2. 网页加载完成后,打开浏览器控制台(按F12),输入以下代码并回车:

    let script = jQuery('script[language="javascript"]');
    var games = [];
    for (let i = 0; i < script.length; i++) {
      if (script.eq(i).html().includes("rgGames")) {
        let rgGames = script.eq(i).html().match(/var.*?rgGames.*?=.*?(\[[\w\W]*?\}\}\]);/);
        if (rgGames) {
          games = JSON.parse(rgGames[1]);
          break;
        }
      }
    }
    document.write(JSON.stringify(games))
    
  3. 将生成的内容复制到博客根目录/node_modules/hexo-steam-games/data/games.json文件内,如果没有对应的文件或目录,请自行创建

示例

示例图片 示例图片

Lisense

Apache Licence 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].