Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,16 @@ jobs:
with:
shared-key: rust-sqlpage-proj-test
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: sudo apt-get update && sudo apt-get install -y unixodbc-dev
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -- -D warnings
- name: Prepare official website
run: npm run site:build
- name: Check official documentation
run: |
npm run site:test
cargo test --locked --features site-build --example build_site
cargo test --locked --features site-build --test mod configuration_docs
- name: Upload prepared website
uses: actions/upload-artifact@v7
with:
Expand Down
7 changes: 4 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ relevant tests and the formatting/lint checks in CONTRIBUTING.md before stopping
Report unavailable checks and failures accurately; a test summary followed by a
hung process is a failure.

Update the existing page or documentation migration for changed behavior. Add a
migration only for new documentation content.
Edit the authored content under `examples/official-site/content/` and the site’s
standalone SQL and Markdown pages in place.

Build and preview the official site with the commands in its [README](./examples/official-site/README.md).
Update `configuration.md` for configuration changes.
Document server options on `AppConfig` where the site build reads them. Keep
setup examples in `configuration.md`.

Add a concise CHANGELOG.md entry only for user-visible changes, and never edit
an already tagged release.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## unreleased

- The [configuration reference](https://sql-page.com/configuration) now lists server settings and their defaults directly from SQLPage. Search for a setting by name or link to it with a URL such as `/configuration#listen_on`.
- Big number title links have a larger target for touch and pointer users.
- Carousel slide indicators and pagination arrows now have accessible names. Keyboard users can activate carousel arrows and enabled pagination links. Screen readers announce the current page.
- Button, card, carousel, and login images accept alternative text. Embedded card frames use their own title or the card title.
Expand Down
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ types, and frontend unit tests. Dynamic frontend changes also need Playwright:

```bash
npm run site:build
npm run site:test
cd tests/end-to-end
npx playwright install --with-deps --only-shell chromium
npm test
Expand Down Expand Up @@ -107,9 +108,10 @@ Architectural constraints and documentation maintenance rules are in
[AGENTS.md](./AGENTS.md).

Edit existing documentation in the [official site](./examples/official-site/) in place.
Deployment recreates the website's database from the site's SQL migrations.
The site [README](./examples/official-site/README.md) describes the format for authoring references and examples.

Run `npm run site` to preview changes using the same site build as deployment.

Update [configuration.md](./configuration.md) for configuration changes and
Document server options on the Rust fields of [`AppConfig`](./src/app_config.rs).
Keep setup examples in [configuration.md](./configuration.md). Update
[CHANGELOG.md](./CHANGELOG.md) for user-visible changes in an unreleased version.
71 changes: 71 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ tokio = { version = "1.24.1", features = ["macros", "rt", "process", "sync"] }
tokio-stream = "0.1.9"
anyhow = "1"
serde = "1"
schemars = { version = "1", optional = true }
# Share SQLPage's bundled libsqlite3-sys with the site builder.
rusqlite = { version = "0.41", default-features = false, optional = true }
serde_yaml_ng = { version = "0.10", optional = true }
serde_json = { version = "1.0.82", features = [
"preserve_order",
"raw_value",
Expand Down Expand Up @@ -137,6 +141,8 @@ opentelemetry-semantic-conventions = { version = "0.33", features = ["semconv_ex

[features]
default = []
config-schema = ["dep:schemars"]
site-build = ["config-schema", "dep:rusqlite", "dep:serde_yaml_ng"]
odbc-static = ["odbc-sys", "odbc-sys/vendored-unix-odbc"]
lambda-web = [
"dep:actix-http",
Expand All @@ -151,3 +157,8 @@ actix-http = "3"
tempfile = "3"
tokio = { version = "1", features = ["rt", "time", "test-util"] }

[[example]]
name = "build_site"
# The application Docker build omits examples.
path = "examples/build_site/main.rs"
required-features = ["site-build"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ select

## Supported databases

- [SQLite](https://www.sqlite.org/index.html), including the ability to [load extensions](./configuration.md) such as *Spatialite*.
- [SQLite](https://www.sqlite.org/index.html), including the ability to [load extensions](https://sql-page.com/configuration#sqlite_extensions) such as *Spatialite*.
- [PostgreSQL](https://www.postgresql.org/), and other compatible databases such as *YugabyteDB*, *CockroachDB* and *Aurora*.
- [MySQL](https://www.mysql.com/), and other compatible databases such as *MariaDB* and *TiDB*.
- [Microsoft SQL Server](https://www.microsoft.com/en-us/sql-server), and all compatible databases and providers such as *Azure SQL* and *Amazon RDS*.
Expand Down Expand Up @@ -218,7 +218,7 @@ You still need to install or provide the database-specific ODBC driver for the d
- Find your [connection string](https://www.connectionstrings.com/).
- It will look like this: `Driver=/opt/snowflake_odbc/lib/libSnowflake.so;Server=xyz.snowflakecomputing.com;Database=MY_DB;Schema=PUBLIC;UID=my_user;PWD=my_password`
- It must reference the path to the database driver you installed earlier, plus any connection parameter required by the driver itself. Follow the instructions from the driver's own documentation.
- Use it in the [DATABASE_URL configuration option](./configuration.md)
- Use it in the [DATABASE_URL configuration option](https://sql-page.com/configuration#database_url)


## How it works
Expand Down
Loading