Giter Club home page Giter Club logo

gsffc.github.io's Introduction

GSF球队内部网站更新指南

By shrekshao狄学长

更多细节功能请参考这篇文档(欢迎贡献)

Netlify Status

目前网站部署在netlify上。会自动拾取main branch 进行build。

primary custom domain为 https://www.gsffc.org

现在 https://gsffc.github.io 也会redirect到新的域名。所以gh-pages branch现在不用了。

如果在本地预览

  • 安装 Jekyll (参考Jekyll官方文档)
  • bundle install
  • bundle exec jekyll serve
  • 浏览器打开localhost:4000
  • 确保build没有问题,各方面满意后git add/commit/..., 可以直接push到main上。不需要review。

如果老子不想配环境的话

  • 建议通过fork repo后提交pull request的方式进行改动(以防止build失败)。

添加战报

  • _posts/ 目录下复制粘贴一个以前的post进行修改最方便
  • 文件名称格式 2022-07-30-title-blablabla.md
  • 如果是针对一场比赛的战报,season_keygame_key填入对应比赛数值即可生成一个formatted比赛链接。否则可以删掉这两个field。 例如: /_data/seasons/23q4/games/2023-10-14-GSF-U-ICP.json 这一场比赛的 session_key23q4,而 game_key 则是 2023-10-14-GSF-U-ICP
  • 图片放置在assets/img/news目录下,欢迎新建subfolder
  • ![](/assets/img/news/first-champion/r3-squad.png){:.centered}以插入图片({.centered}是ref一个css class用来居中)
  • 带描述文字的图片也可以这样添加{% include imgdesc.html url="assets/img/news/bio/ningguanghan-1.gif" description="Dribbling / solo goals" %}
  • 样例
---
layout: game_post
season_key: "22q3-1"
game_key: "2022-07-23-1"

title:  "克星神威再现造三球!榜首大战GSF 3:2 逆转绝杀SBK"
categories: news
tags: 战报 9人制 22校联杯
author: 狄克
---

*文 某位球星*

2022校联杯第三比赛日,一日双赛,第三轮GSF迎来榜首大战,对阵两场同积6分的SouthBay Knight。
GSF最终3:2逆转绝杀SBK。玄宗助攻Kevin 李峰两度扳平比分,并在90分钟杀入禁区完成绝杀,再现曾经对SBK帽子戏法的克星本色!

![](/assets/img/news/first-champion/r3-squad.png){:.centered}

此战由洪泽指导指挥。。。

{% include imgdesc.html url="assets/img/news/bio/ningguanghan-1.gif" description="Dribbling / solo goals" %}

添加比赛

  • 路径和文件名_data/seasons/22q4/games/2022-08-06-1234.json(复制一个修改即可)
  • 如有youtube上的视频,只需要复制https://www.youtube.com/watch?v=SUJhUunlCU8的v=后面部分替换就行。
  • 队伍Key对应的_data/seasons/22q4/teams/下的json文件名(将22q4更换为需要的赛季)。
  • 球员名称对应相应队伍json文件中的name。如果是其他队不认识的人进球之类,可以用"??",这样插件不会去寻找这个球员。
  • 若为小组赛比赛type要包含group字样(groupo-r2翻译为小组赛第二轮)。联赛比赛无所谓,可以写个轮数#2(会翻译为"第2轮",目前使用的多语言插件似乎没有escape或高级的format的功能)。
  • 支持的比赛事件列在下面的样例里了。复制粘贴依样画葫芦就行。
  • 比分要手填并非自动计算(照顾其他队不知道进球事件只知道比分的情况)
  • 样例
{
    "date": "2022-07-16 04:00PM",
    "type": "group-r1",
    "videos": [
        "<iframe src=\"https://www.youtube.com/embed/wDIlQnrIDl0\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
    ],
    "home": {
        "key": "GSF",
        "score": 2,
        "events": [
            {"type": "goal", "time": 17, "player": "狄克", "assist": "杨帆"}
            ,{"type": "penalty", "time": 49, "player": "狄克"}
            ,{"type": "off", "time": 50, "player": "狄克", "sub": "王金鹏"}
            ,{"type": "yellow", "time": 51, "player": "狄克"}
            ,{"type": "red", "time": 52, "player": "狄克"}
        ],
        "squad": [
            {"name": "锡麟", "locator": "GK"}
            ,{"name": "Colin", "locator": "LCB"}
            ,{"name": "张自然", "locator": "RCB"}
            ,{"name": "王政", "locator": "LM"}
            ,{"name": "张一宁", "locator": "CDM"}
            ,{"name": "狄克", "locator": "RM"}
            ,{"name": "Kevin", "locator": "CAM"}
        ]
        ,"bench": [
            {"name": "Ted"}
            ,{"name": "庭朝"}
            ,{"name": "杨帆"}
            ,{"name": "Xuan"}
            ,{"name": "杜若衡"}
            ,{"name": "文韬"}
            ,{"name": "刘喆"}
            ,{"name": "Max"}
            ,{"name": "李峰"}
        ]
    },
    "away": {
        "key": "CMU",
        "score": 2,
        "events": [
            {"type": "owngoal", "time": 18, "player": "狄克"}
            ,{"type": "goal", "time": 90, "player": "??"}
        ],
        "squad": []
    }
}

自动添加本赛季的若干场比赛结果

  • 访问足联网站, 例如这个链接.
  • 选择 "All Divisions", "All Team", "Finished".
  • 选择 "All entries".
  • 在页面底部选择本站尚未收录的所有比赛, 复制, 粘贴入 scripts/games.txt 中.
  • node scripts/create-game-json.js.
  • 注意, 赛季名称目前硬编码在 scripts/create-game-json.js:line63.

添加赛季(TODO)

gsffc.github.io's People

Contributors

shrekshao avatar aenon avatar guanghan avatar brucew-lelouch avatar ciaocloud avatar jiaenren avatar krrbsryzr avatar dongminator avatar

Stargazers

 avatar  avatar

Watchers

 avatar

gsffc.github.io's Issues

Vue single-page app + load `public/data/*.json` solution?

暂时build性能还行。但是数据线性增长,build的时间会变多,build的页面也变多。

考虑换用vue single-page app,http请求静态json数据(加点建议本地node.js数据预处理脚本)

仍然保持静态网站免费部署,不用再装ruby了(最初用jekyll是为了github page默认支持,用netlify部署就没必要了)

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.