Compare commits

...

3 Commits
0.4.4 ... main

Author SHA1 Message Date
71c5915628 ci(docker): add Dockerfile 2026-04-07 03:25:36 +03:00
17ae6a036e docs(changelog): change changelog style 2026-03-30 13:38:27 +03:00
6c88272e58 chore: rust-toolchain file 2026-03-30 13:24:18 +03:00
4 changed files with 63 additions and 12 deletions

8
.dockerignore Normal file
View File

@ -0,0 +1,8 @@
target/
.git/
.gitignore
Dockerfile
.dockerignore
README.md
.env
*.md

View File

@ -6,7 +6,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/lang/en/).
## [0.4.4] - 2026-03-29
## v0.4.4 - 2026-03-29
### Fixed
- Fixed removing newlines.
@ -14,7 +14,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
---
## [0.4.3] - 2026-03-28
## v0.4.3 - 2026-03-28
### Changed
- Change footer.
@ -22,14 +22,14 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
---
## [0.4.2] - 2026-03-27
## v0.4.2 - 2026-03-27
### Added
- Added version and project name in footer.
---
## [0.4.1] - 2026-03-26
## v0.4.1 - 2026-03-26
### Fixed
- Added support for rendering individual files, not just directories (e.g.,
`mdpreview dir/file.md`).
@ -39,7 +39,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
---
## [0.4.0] - 2026-03-25
## v0.4.0 - 2026-03-25
### Added
- Added a button to copy the edit command (`note edit current_note.md`).
@ -47,7 +47,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
---
## [0.3.0] - 2026-03-24
## v0.3.0 - 2026-03-24
### Added
- Added the `--random` flag to open the browser on a random page when used with
`--browser` (`--browser --random`).
@ -56,7 +56,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
---
## [0.2.1] - 2026-03-23
## v0.2.1 - 2026-03-23
### Fixed
- Fixed an issue where listening on port 0 (`--port 0`) caused the browser to
open the wrong port.
@ -65,7 +65,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
---
## [0.2.0] - 2026-03-23
## v0.2.0 - 2026-03-23
### Added
- Added the `--browser` flag to automatically open the page in the browser.
@ -73,7 +73,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
---
## [0.1.3] - 2026-03-23
## v0.1.3 - 2026-03-23
### Added
- Added a "Random File" button to the header.
@ -89,7 +89,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
---
## [0.1.2] - 2026-03-22
## v0.1.2 - 2026-03-22
### Added
- Added a "Random File" button.
- Added an "On Main" button.
@ -102,6 +102,6 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
---
## [0.1.1] - 2026-03-21
## v0.1.1 - 2026-03-21
### Added
- Added page titles.

43
Dockerfile Normal file
View File

@ -0,0 +1,43 @@
FROM rust:1.94 AS chef
RUN cargo install --locked cargo-chef
WORKDIR /app
COPY Cargo.toml Cargo.lock .
RUN mkdir src && touch src/main.rs
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=chef /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY rust-toolchain.toml rust-toolchain.toml
RUN cargo fetch
COPY . .
RUN cargo build --release
FROM debian:bookworm-slim AS runtime
RUN useradd -m -s /bin/bash appuser
WORKDIR /app
COPY --from=builder /app/target/release/mdpreview /usr/local/bin/mdpreview
USER appuser
EXPOSE 8080
CMD ["mdpreview"]

View File

@ -1,3 +1,3 @@
[toolchain]
channel = "stable"
components = ["clippy", "rustfmt", "chef"]
components = ["clippy", "rustfmt"]