feat: add SharePanel component for social sharing with QR code support
- Implemented SharePanel component in `SharePanel.astro` for sharing content on social media platforms. - Integrated QR code generation for WeChat sharing using the `qrcode` library. - Added localization support for English and Chinese languages. - Created utility functions in `seo.ts` for building article summaries and FAQs. - Introduced API routes for serving IndexNow key and generating full LLM catalog and summaries. - Enhanced SEO capabilities with structured data for articles and pages.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
FROM rust:1.94-trixie AS chef
|
||||
RUN cargo install cargo-chef --locked
|
||||
# syntax=docker/dockerfile:1.7
|
||||
|
||||
FROM rust:1.94.1-trixie AS chef
|
||||
RUN rustup component add rustfmt clippy \
|
||||
&& cargo install cargo-chef --locked
|
||||
WORKDIR /app
|
||||
|
||||
FROM chef AS planner
|
||||
@@ -7,11 +10,20 @@ COPY . .
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM chef AS builder
|
||||
ENV CARGO_HOME=/usr/local/cargo \
|
||||
CARGO_TARGET_DIR=/app/.cargo-target
|
||||
COPY --from=planner /app/recipe.json recipe.json
|
||||
RUN cargo chef cook --release --locked --recipe-path recipe.json
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db,sharing=locked \
|
||||
--mount=type=cache,target=/app/.cargo-target,sharing=locked \
|
||||
cargo chef cook --release --locked --recipe-path recipe.json
|
||||
|
||||
COPY . .
|
||||
RUN cargo build --release --locked --bin termi_api-cli
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,target=/usr/local/cargo/git/db,sharing=locked \
|
||||
--mount=type=cache,target=/app/.cargo-target,sharing=locked \
|
||||
cargo build --release --locked --bin termi_api-cli \
|
||||
&& install -Dm755 /app/.cargo-target/release/termi_api-cli /tmp/termi_api-cli
|
||||
|
||||
FROM debian:trixie-slim AS runtime
|
||||
RUN apt-get update \
|
||||
@@ -19,7 +31,7 @@ RUN apt-get update \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/target/release/termi_api-cli /usr/local/bin/termi_api-cli
|
||||
COPY --from=builder /tmp/termi_api-cli /usr/local/bin/termi_api-cli
|
||||
COPY --from=builder /app/config ./config
|
||||
COPY --from=builder /app/assets ./assets
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
Reference in New Issue
Block a user