Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,18 @@ cargo clippy
cargo clippy --fix
```

#### Just
There is a `justfile` in the root of repo, you can use it for checkings.
```bash
cargo install just
just check
# Ensure your changes are committed before running.
just fix
# If you have free time :)
just pedantic
just pedantic_fix
#### Mask

There is a `maskfile.md` in the root of repo, you can use it for checkings.

```bash
cargo install mask
mask check

# Ensure your changes are committed before running.
mask fix

# If you have free time :)
mask pedantic
mask pedantic_fix
```
43 changes: 0 additions & 43 deletions justfile

This file was deleted.

86 changes: 86 additions & 0 deletions maskfile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Marmite Development Tasks

This file contains development tasks for the Marmite static site generator.

## check

> Check code formatting and run clippy

~~~bash
cargo fmt -- --check
cargo clippy
~~~

## pedantic

> Check code formatting and run clippy with pedantic warnings

~~~bash
cargo fmt -- --check
cargo clippy -- -W clippy::pedantic
~~~

## fmt

> Format the code

~~~bash
cargo fmt
~~~

## fix

> Fix clippy warnings

~~~bash
cargo clippy --fix
~~~

## pedantic_fix

> Fix clippy warnings with pedantic settings

~~~bash
cargo clippy --fix -- -W clippy::pedantic
~~~

## watch

> Watch for changes and rebuild

~~~bash
cargo watch -c -q -x "run example ../site_example -vvvv"
~~~

## bumpversion (tag)

> Bump version in Cargo.toml

~~~bash
#!/usr/bin/env bash
cargo set-version --version || cargo install -y [email protected]
cargo set-version --package marmite --locked "$tag"
cargo generate-lockfile
mask fmt
git add ./Cargo.toml ./Cargo.lock
git commit -m "chore: bump version to $tag"
~~~

## pushtag (tag)

> Push a new tag to the repository

~~~bash
#!/usr/bin/env bash
git tag -a "$tag" -m "chore: push $tag"
git push --tags
~~~

## publish (tag)

> Publish a new version (bumpversion + pushtag)

~~~bash
mask bumpversion "$tag"
mask pushtag "$tag"
~~~
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub fn get_table_of_contents_from_html(html: &str) -> String {
std::cmp::Ordering::Equal => {}
}

write!(toc, "<li><a href=\"{slug}\">{title}</a></li>\n").unwrap();
writeln!(toc, "<li><a href=\"{slug}\">{title}</a></li>").unwrap();
last_level = level;
}

Expand Down
Loading