231 Commits
Author SHA1 Message Date
github-actions[bot] 03a433d94a chore: release v2.10.0 (#1158)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-23 23:41:37 +08:00
qwqcode a5308548ba fix(config): preserve keyword file separators
Represent control characters with reversible dashboard escapes, keep custom separators intact, and reject empty separators before loading keyword files. Document and test the full YAML round trip.

Fixes #1062
2026-07-22 22:20:28 +08:00
qwqcode 69613beb88 fix(docs): support React 19 useRef types 2026-07-22 22:20:27 +08:00
qwqcode d46326788b docs: document dependency and security updates
Record the backend, frontend, container, and CI dependency refresh in both v2.10.0 release guides.

Explain JWT wire compatibility, the sanitizer replacement, patched transitive pins, generator reproducibility, and unchanged release artifact layout.
2026-07-22 22:20:26 +08:00
qwqcode 5b6a453349 fix(ui): preserve generated list response contract
Regenerate the Swagger specification and TypeScript client with the pinned generators, including accurate optional response fields and the verified-email SSO description.

Validate comment-list page data at the API boundary and normalize it back to the public ListData contract before storing or emitting the response.
2026-07-22 22:20:25 +08:00
qwqcode b7b6700407 fix(auth): require verified email for SSO exchange
Reject OIDC userinfo responses without email_verified=true before account lookup or JWT issuance.
2026-07-22 22:20:25 +08:00
qwqcode cb2860a778 docs: add v2.10.0 release notes
BREAKING CHANGE: Beyond #997, #1007, and #1011, v2.10.0 changes default config/data discovery and relative-path semantics; raises source builds to Go 1.26.5; replaces the CGO-backed SQLite driver with a pure-Go implementation; fixes application timezone at process initialization, requiring a full restart to change it; removes the useBackendConf opt-out and remoteConfModifier; changes DI registration, Context mutation, update() return value, and created timing; and requires marked 18 with modern package resolution. Migration guide: https://artalk.js.org/en/guide/releases/v2.10.0.html
2026-07-22 22:20:25 +08:00
qwqcode 5b0e4c866e fix(api): validate vote status targets 2026-07-22 22:20:23 +08:00
qwqcode b47eed5303 chore(deps): bump frontend deps
Update the UI, sidebar, plugins, documentation, lint, test, and build toolchains, including Vite 8.1, Marked 18.0.7, TypeScript 6, and current framework packages.

Pin patched transitive dependencies, move pnpm policy to the workspace configuration, approve the esbuild install script, and refresh generated router metadata.
2026-07-22 22:13:44 +08:00
Henrik Pettersenandqwqcode cf06808170 feat(auth): add SSO token exchange endpoint (#1134)
* feat(auth): add SSO token exchange endpoint

Adds POST /api/v2/sso/exchange — accepts an access token from an
external OIDC IdP (verified by calling the IdP's /userinfo) and issues
an Artalk session JWT for the user identified by the email claim.

Use case: a surrounding application that already runs OIDC (e.g. an
Auth0 SPA) can drive Artalk sign-in without showing Artalk's own popup
login UI. The widget reads the resulting JWT from
localStorage["ArtalkUser"].token and treats the user as fully
authenticated for is_login/is_admin checks.

Implementation:
- One new handler at server/handler/auth_sso_exchange.go (~110 lines)
- Reuses dao.FindCreateUser + common.LoginGetUserToken; same JWT
  format as /user/access_token, so no client-side changes needed
- Validation by calling {issuer}/userinfo with Authorization: Bearer
  — OIDC-standard, no JWKS dep added
- Gated by auth.enabled && auth.sso.enabled (404 otherwise)
- Returns the same ResponseUserLogin shape as /auth/email/login

Config additions (conf/artalk.example.yml):
  auth:
    sso:
      enabled: false
      issuer: ""   # e.g. "tenant.auth0.com"

Route registered alongside the existing social-login routes in
server/server.go.

Verified by go build ./... (clean).

* chore(config): regenerate env-path cache with auth.sso entries

Required so koanf actually maps ATK_AUTH_SSO_ENABLED/ISSUER env vars
to the new auth.sso config block introduced in feat: add SSO token
exchange endpoint. Without this regen the env vars are silently
ignored and the endpoint stays in its disabled state.

* docs: add sso token exchange section for auth docs

---------

Co-authored-by: qwqcode <qwqcode@gmail.com>
2026-06-14 17:02:58 +01:00
xaoxuu 3b00a5e356 chore(docs): add xaoxuu to showcase (#1098) 2026-06-14 10:57:38 +01:00
Garnet dcac8cc883 chore(docs): revise French landing page translations (#1075) 2026-06-14 09:37:02 +01:00
Hsüan b39ec2a0a6 feat(db): add TLS support for MySQL with Google Cloud SQL (#1104)
* Support Google cloud SQL Mysql SSL

* fix typo
2026-05-05 21:55:54 +08:00
qwqcode 5c3df4776e feat(go): upgrade golang to v1.26.2 and some deps 2026-05-05 20:33:17 +08:00
Kegongteng efe62e93e2 chore(docs): Improve the transfer document (#1109) 2026-04-12 19:27:09 +08:00
她和她的猫 71a651153b chore(docs): correct docker arg name for skipping ui build (#1086) 2025-06-09 19:27:38 +08:00
qwqcode 3e45bb9506 chore(landing): improve landing page and docs 2025-02-02 16:26:20 +08:00
qwqcode 99736db27f chore(style): fix bg color of login dialog in sidebar for dark mode 2024-11-25 00:00:51 +08:00
qwqcode 71b73a323a chore(docs/landing): fix tech icons in landing page 2024-11-06 22:22:23 +08:00
qwqcode 659023988e docs(landing): redesign landing page (#1020) 2024-11-06 21:53:23 +08:00
qwqcode 258dfde60e docs: integrate git changelog plugin 2024-10-19 16:32:34 +08:00
qwqcode 91ac907778 chore(ui/deps): upgrade deps for ui 2024-10-19 16:25:48 +08:00
qwqcode 73da8740ee chore(docs): add frontend typedoc 2024-10-19 14:34:01 +08:00
Lance.Moe 15f2fb82a3 chore(docs): corrected react usage example (#1012) 2024-10-19 13:11:29 +08:00
qwqcode bd81b7c10c feat(ui/conf): add preferRemoteConf option (#1000) (#1011)
Add `preferRemoteConf` option (disabled by default).

Local config now takes priority, addressing the issue where remote config previously overrode local settings. (Closes #1000)

Updated config merging logic in `mount.ts`.

Deprecated `useBackendConf` in favor of `preferRemoteConf`.

(The prerequisite PR is #1007)

BREAKING CHANGE: UI client now prioritizes local config in the latest version, whereas previously, the remote config would override it. (See #1011)
2024-10-18 21:46:49 +08:00
qwqcode 5065bb4763 chore: update CONTRIBUTING.md 2024-10-11 13:31:20 +08:00
Limeandqwqcode baa63866f4 feat(ui/page_vote): add page voting feature (#983)
* feat(plugin/page_vote): add `page_vote` plugin

* feat(plugin/page_vote): update vote count text

adjust code structure
disable `page vote` plugin by default

* feat(plugin/page_vote): reuse actions btn style

* perf(plugin/page-vote): make type strong

* feat: watch `darkMode` conf

* doc(plugin/page_vote): add config doc

* feat(ui/page_vote): add page voting feature

- Introduce page voting functionality
- Update configuration to enable/disable page voting
- Retrieve html elements for voting buttons and counts
- Enhance customization options for voting elements
- Reference: #983, #998, #997

---------

Co-authored-by: qwqcode <qwqcode@gmail.com>
2024-10-08 12:38:39 +08:00
qwqcode 7c251fd067 feat(api/vote): add get vote status endpoint (#998)
A new HTTP API endpoint `GET /votes/:target_name/:target_id` is now available. (See https://artalk.js.org/http-api.html#tag/Vote/operation/GetVote)

- Implement GET endpoint for retrieving vote status
- Add tests for vote functionality

Related to: #997

This is a prerequisite PR for #983.
2024-10-06 22:31:59 +08:00
qwqcode 02a369fe5c refactor(api/vote): refactor vote http endpoint and logic (#997)
The original `POST /votes/:type/:target_id` endpoint for creating votes has been updated to `POST /votes/:target_name/:target_id/:choice`. The `target_name` can be either `comment` or `page`, the `target_id` is a numeric value, and the `choice` can be `up` or `down`. (https://artalk.js.org/http-api.html#tag/Vote/operation/CreateVote)

The HTTP response now includes two additional fields: `is_up` and `is_down`, which indicate the user's current voting state. The `up` and `down` fields remain unchanged and continue to be of numeric type, ensuring backward compatibility with existing clients.

- Change vote endpoint to include `{target_name}` and `{choice}`
- Update vote logic to handle `up` and `down` choices
- Modify request data models and API interfaces for new vote structure
- Ensure backward compatibility with existing vote response data
- Improve vote handling and response structure

BREAKING CHANGE: Vote HTTP API endpoint have been updated. (See #997)
2024-10-06 22:15:15 +08:00
qwqcode bd0db8cd57 chore(docs): revise ui config docs 2024-10-06 21:45:01 +08:00
qwqcode 206a26d0c1 feat(ui): add npm published version check script
- Introduce check:publish script to verify npm versions
- Ensure all projects have the latest versions on npm
- Skip private packages during version checks
- Allow filtering by specific project name with -F option
2024-10-05 21:13:02 +08:00
qwqcode abac3f0f36 feat(ui/eslint): add eslint plugin for artalk ui development (#995)
- Implemented `eslint-plugin-artalk` to enforce Artalk's development conventions.
- Added setup script for UI development environment.
- Created test cases for Artalk plugin rules.
- Configured TypeScript and build settings for the plugin.
- Updated documentation with installation and configuration instructions.
2024-10-05 19:19:22 +08:00
qwqcode ea9c5d9ecb chore(docs): add install guide for fedora linux distro 2024-10-01 14:47:20 +08:00
qwqcode 8707f4f327 docs(landing): add more translations 2024-09-20 21:03:56 +08:00
qwqcode d5d458de11 docs(landing): optimize responsive font size 2024-09-19 21:17:38 +08:00
qwqcode c087400a66 chore(docs): set up redirects for old pages 2024-09-19 21:14:07 +08:00
qwqcode 34d793697c chore(docs): refine deployment documentation 2024-09-19 18:27:24 +08:00
github-actions[bot] b9c3b2a1c3 chore: release v2.9.1 (#981)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-18 23:50:46 +08:00
qwqcode bd121f8f94 docs: refine deployment documentation 2024-09-18 23:47:35 +08:00
qwqcode 53aaf27fdf chore(deps): upgrade frontend deps 2024-09-18 21:56:38 +08:00
qwqcode 9cc3252c0f chore(docs): add support for auto-redirect to language-specific docs 2024-09-18 12:51:17 +08:00
qwqcode 349eb6f5c5 chore(docs): update the Chinese slogan on the homepage 2024-09-17 23:35:05 +08:00
qwqcode 55a96f12aa chore(docs): make English the default readme 2024-09-17 22:34:09 +08:00
qwqcode 36580b5fc3 chore(docs): apply artalk locale from html lang 2024-09-17 21:46:14 +08:00
qwqcode 9afa7ca555 docs(i18n): add English translations for docs (#978)
* docs: add support for multiple languages

* docs(i18n): add English translations
2024-09-17 21:19:48 +08:00
qwqcode 6d54b721da docs(landing): add multi-language and dark-mode for landing 2024-09-17 17:48:05 +08:00
qwqcode cb4596d59d docs(landing): add demo video in landing page 2024-09-17 17:44:17 +08:00
qwqcode 4913e1aebd chore(docs): update extras.md 2024-09-17 17:41:27 +08:00
qwqcode a98a50abbe test(mutex): add tests for keyed mutex 2024-09-16 16:55:38 +08:00
qwqcode 9dcfd9cd91 chore(deps): upgrade deps 2024-09-15 09:52:26 +08:00