{"id":15138245,"url":"https://github.com/heng30/sblog","last_synced_at":"2026-01-19T05:33:20.128Z","repository":{"id":203034090,"uuid":"707069721","full_name":"heng30/sblog","owner":"heng30","description":"This is a simple blog that provides web services using Rust Rocket and generates web pages through HTML templates.","archived":false,"fork":false,"pushed_at":"2025-02-20T07:26:28.000Z","size":608,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T09:18:06.844Z","etag":null,"topics":["blog","rocket","rust","web","web-template"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heng30.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-10-19T06:58:44.000Z","updated_at":"2025-02-20T07:26:17.000Z","dependencies_parsed_at":"2023-12-22T10:40:53.217Z","dependency_job_id":"7095a7d9-7964-4d2f-b4ce-79113286bca9","html_url":"https://github.com/heng30/sblog","commit_stats":null,"previous_names":["heng30/sblog"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heng30%2Fsblog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heng30%2Fsblog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heng30%2Fsblog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heng30%2Fsblog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heng30","download_url":"https://codeload.github.com/heng30/sblog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457787,"owners_count":20941907,"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":["blog","rocket","rust","web","web-template"],"created_at":"2024-09-26T07:21:24.296Z","updated_at":"2026-01-19T05:33:20.104Z","avatar_url":"https://github.com/heng30.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![screenshot](./screenshot/sblog.png)\n\n[中文文档](./README.zh-CN.md)\n\n#### Introduction\nThis is a simple blog that provides web services using `Rust Rocket` and generates web pages through HTML templates. You can visit the [Lost Land](https://heng30.xyz) to view the frontend.\n\n#### How to deploy?\nAfter the first startup, the default HTML template will be generated. The template is located in the `~/.local/share/sblog/template` directory and includes the following files:\n````\ntemplate\n├── about-body.html\n├── about-body.md\n├── frame.html\n├── header.html\n├── home-body.html\n└── post-body.html\n````\nThe `about-bodd.md` file is empty and needs to be filled with specific content according to your needs. The content format should be in Markdown.\nYou can also modify the HTML files according to your needs.\n\nAfter the first startup, the default configuration file will be generated. The configuration file is located at `~/.config/sblog/sblog.conf`.\n````\n{\n  \"server\": {\n    \"listen_address\": \"0.0.0.0\",\n    \"listen_port\": 8080\n  },\n  \"rssinfo\": {\n    \"author\": \"author\",\n    \"email\": \"your-email\",\n    \"uri\": \"https://example.com\"\n  },\n  \"webinfo\": {\n    \"site_logo_tab\": \"/assest/logo.png\",\n    \"site_logo\": \"/assest/logo.png\",\n    \"site_name\": \"your-blog-name\"\n  }\n}\n````\n`rssinfo` and `webinfo` are parameters for the HTML template and **must** be filled in. The `webinfo` root directory is `~/.local/share/sblog`.\n\n#### How to publish articles?\n- Articles should be placed in the `~/.local/share/sblog/post/md` directory. The article format should be in Markdown, and the article name format **must** be: `title@@tag@@publish-date`. For example: `markdown@@tag1,tag2@@2023-12-01.md`.\n- The `homepage` and `rss` require a `summary` information, which is saved in the `~/.local/share/sblog/post/summary` directory. The file name **must** be the same as the article's `title`. The format of the `summary` is: `title.summary`. For example: `markdown.summary`.\n- Blog resource files can be saved in the `~/.local/share/sblog/post/assest` directory. You can use `[example](/post/assest/a.txt)` to reference them in your articles.\n\n#### How to build?\n- Install `Rust` and `Cargo`\n- Run `make`\n- See [Makefile](./Makefile) for more information\n\n#### How to test?\n- Start the `sblog` service.\n- Run `make install-testdata` to install test data.\n- Open a browser and visit `localhost:8080` to access the test data.\n- Run `make uninstall-testdata` to delete test data. **Note**: This will delete all articles.\n\n#### Reference\n- [Rocket](https://rocket.rs/v0.5-rc/guide/introduction/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheng30%2Fsblog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheng30%2Fsblog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheng30%2Fsblog/lists"}