{"id":18904269,"url":"https://github.com/hugo-fixit/shortcode-rewards","last_synced_at":"2025-06-17T23:03:14.440Z","repository":{"id":249587806,"uuid":"831745038","full_name":"hugo-fixit/shortcode-rewards","owner":"hugo-fixit","description":"A Hugo theme component with reward-log or sponsor-log shortcode.","archived":false,"fork":false,"pushed_at":"2024-12-08T17:30:24.000Z","size":29,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T03:48:46.109Z","etag":null,"topics":["hugo","reward-log","shortcodes","theme-component"],"latest_commit_sha":null,"homepage":"https://lruihao.cn/reward/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hugo-fixit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://paypal.me/Lruihao"]}},"created_at":"2024-07-21T14:02:29.000Z","updated_at":"2024-12-08T17:30:11.000Z","dependencies_parsed_at":"2025-04-15T03:44:41.623Z","dependency_job_id":null,"html_url":"https://github.com/hugo-fixit/shortcode-rewards","commit_stats":null,"previous_names":["hugo-fixit/shortcode-rewards"],"tags_count":6,"template":false,"template_full_name":"hugo-fixit/component-skeleton","purl":"pkg:github/hugo-fixit/shortcode-rewards","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugo-fixit%2Fshortcode-rewards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugo-fixit%2Fshortcode-rewards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugo-fixit%2Fshortcode-rewards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugo-fixit%2Fshortcode-rewards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugo-fixit","download_url":"https://codeload.github.com/hugo-fixit/shortcode-rewards/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugo-fixit%2Fshortcode-rewards/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260453715,"owners_count":23011572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hugo","reward-log","shortcodes","theme-component"],"created_at":"2024-11-08T09:07:57.278Z","updated_at":"2025-06-17T23:03:09.424Z","avatar_url":"https://github.com/hugo-fixit.png","language":"HTML","funding_links":["https://paypal.me/Lruihao"],"categories":[],"sub_categories":[],"readme":"# shortcode-rewards\n\nA Hugo theme component with `reward-log` or `sponsor-log` shortcode.\n\n## Demo\n\n- [FixIt Docs](https://fixit.lruihao.cn/contributing/overview/#sponsor)\n- [Lruihao's Blog](https://lruihao.cn/about/#sponsor)\n\n## Requirements\n\n\u003e Developed based on the FixIt Timeline plugin.\n\n- FixIt v0.3.9 or later.\n\n## Install Component\n\nThe installation method is the same as [installing a theme](https://fixit.lruihao.cn/documentation/installation/). There are several ways to install, choose one, for example, install through Hugo Modules:\n\n```diff\n[module]\n  [[module.imports]]\n    path = \"github.com/hugo-fixit/FixIt\"\n+ [[module.imports]]\n+   path = \"github.com/hugo-fixit/shortcode-rewards\"\n```\n\n## Inject Partial\n\nInject the `shortcode-rewards.html` into the `custom-head` through the custom block opened by the FixIt theme in the `layouts/partials/custom.html` file:\n\n```go-html-template\n{{- define \"custom-head\" -}}\n  {{- partial \"inject/shortcode-rewards.html\" . -}}\n{{- end -}}\n```\n\n## Usage\n\nFirst, create the `reward-log.yml` file and edit your data:\n\n```bash\ncp themes/shortcode-sponsor-log/reward_log.yml.example data/reward_log.yml\n```\n\n\u003e If your site is multilingual, you can create a `reward_log.en.yml` file for English and `reward_log.zh-cn.yml` for Chinese.\n\nNext, use the `reward-log` shortcode in any page:\n\n```markdown\n{{\u003c reward-log \u003e}}\n```\n\n\u003e [!note]\n\u003e For compatibility with older versions, `sponsor-log` shortcode can also be used, and the corresponding data file is `sponsor_log.yml`.\n\n## Params\n\n### Shortcode\n\nThe `reward-log` shortcode has the following named parameters, and the positional parameters ordered from top to bottom:\n\n| Parameter | Description                                                       | Type    | Optional values        | Default |\n| :-------- | :---------------------------------------------------------------- | :------ | :--------------------- | :------ |\n| reverse   | whether the node is ascending or descending                       | boolean | -                      | true    |\n| placement | position of timestamp                                             | string  | top / bottom           | bottom  |\n| animation | whether to enable animation                                       | boolean | -                      | false   |\n| size      | node size                                                         | string  | small / medium / large | medium  |\n| node      | node style                                                        | string  | circle / dot           | circle  |\n| width     | `#` container width                                               | string  | -                      | -       |\n| height    | `#` container height                                              | string  | -                      | -       |\n| class     | `#` container classname                                           | string  | -                      | -       |\n\n\u003e Parameters marked with `#` only support named parameters.\n\n### Data\n\nThe `reward_log.yml` file has the following fields:\n\n```yaml\n# The sponsor logs data format is as follows\n# currency: [CNY, USD, EUR, ...] https://gohugo.io/functions/lang/formatcurrency/\n# origin: [alipay, bitcoin, paypal, wechatpay, ...]\n\nmessage: Thanks all!\ncurrency: CNY\nsymbol: ¥\n# The sponsor logs inherit the FixIt Timeline events\nlogs:\n  - date: \"2006-01-02 15:04:05\"\n    sponsor: Cell\n    money: 50\n    origin: alipay\n    remark: \"Come on!\"\n```\n\n## References\n\n- [Develop Theme Components | FixIt](https://fixit.lruihao.cn/contributing/components/)\n- [How to Develop a Hugo Theme Component | FixIt](https://fixit.lruihao.cn/components/dev-component/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugo-fixit%2Fshortcode-rewards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugo-fixit%2Fshortcode-rewards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugo-fixit%2Fshortcode-rewards/lists"}