Skip to content

Commit

Permalink
Merge pull request #678 from getzola/next
Browse files Browse the repository at this point in the history
0.8.0
  • Loading branch information
Keats authored Jun 22, 2019
2 parents 4b46749 + 193e35e commit e690226
Show file tree
Hide file tree
Showing 75 changed files with 2,399 additions and 1,092 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ matrix:

# The earliest stable Rust version that works
- env: TARGET=x86_64-unknown-linux-gnu
rust: 1.31.0
rust: 1.34.0


before_install: set -e
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.8.0 (2019-06-22)

### Breaking

- Allow specifying heading IDs. It is a breaking change in the unlikely case you are using `{#..}` in your heading
- Internal links are now starting by `@/` rather than `./` to avoid confusion with relative links

### Other

- Fix image processing not happening if called from the template
- Add a `zola check` command to that validates the site and checks all external links
- Sections can have `aliases` as well
- Anchors in internal links are now checked for existence

## 0.7.0 (2019-04-28)

### Breaking
Expand Down
1,523 changes: 831 additions & 692 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zola"
version = "0.7.0"
version = "0.8.0"
authors = ["Vincent Prouillet <[email protected]>"]
license = "MIT"
readme = "README.md"
Expand All @@ -26,9 +26,10 @@ termcolor = "1.0.4"
# Used in init to ensure the url given as base_url is a valid one
url = "1.5"
# Below is for the serve cmd
actix-web = { version = "0.7", default-features = false, features = [] }
actix-files = "0.1"
actix-web = { version = "1.0", default-features = false, features = [] }
notify = "4"
ws = "0.7"
ws = "0.8"
ctrlc = "3"

site = { path = "components/site" }
Expand All @@ -53,5 +54,6 @@ members = [
"components/library",
]

#[profile.release]
#debug = true
[profile.release]
lto = true
codegen-units = 1
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM bitnami/minideb AS builder
RUN install_packages python-pip curl tar python-setuptools rsync binutils
RUN pip install dockerize
RUN mkdir -p /workdir
WORKDIR /workdir
ENV DOCKER_TAG v0.7.0
RUN curl -L https://github.com/getzola/zola/releases/download/$DOCKER_TAG/zola-$DOCKER_TAG-x86_64-unknown-linux-gnu.tar.gz | tar xz
RUN mv zola /usr/bin
RUN dockerize -n -o /workdir /usr/bin/zola


FROM scratch
COPY --from=builder /workdir .
ENTRYPOINT [ "/usr/bin/zola" ]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ in the `docs/content` folder of the repository and the community can use [its fo
| Search | ![yes](./is-yes.svg) | ![no](./is-no.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) |
| Data files | ![yes](./is-yes.svg) | ![yes](./is-yes.svg) | ![yes](./is-yes.svg) | ![no](./is-no.svg) |
| LiveReload | ![yes](./is-yes.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) | ![yes](./is-yes.svg) |
| Netlify support | ![ehh](./is-ehh.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) | ![no](./is-no.svg) |
| Netlify support | ![yes](./is-yes.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) | ![no](./is-no.svg) |
| Breadcrumbs | ![yes](./is-yes.svg) | ![no](./is-no.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) |
| Custom output formats | ![no](./is-no.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) | ![no](./is-no.svg) |

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:

matrix:
- target: x86_64-pc-windows-msvc
RUST_VERSION: 1.31.0
RUST_VERSION: 1.34.0
- target: x86_64-pc-windows-msvc
RUST_VERSION: stable

Expand Down
18 changes: 17 additions & 1 deletion completions/_zola
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ _arguments "${_arguments_options[@]}" \
'--version[Prints version information]' \
&& ret=0
;;
(check)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
Expand All @@ -85,8 +93,9 @@ esac
_zola_commands() {
local commands; commands=(
"init:Create a new Zola project" \
"build:Builds the site" \
"build:Deletes the output directory if there is one and builds the site" \
"serve:Serve the site. Rebuild and reload on change automatically" \
"check:Try building the project without rendering it. Checks links" \
"help:Prints this message or the help of the given subcommand(s)" \
)
_describe -t commands 'zola commands' commands "$@"
Expand All @@ -98,6 +107,13 @@ _zola__build_commands() {
)
_describe -t commands 'zola build commands' commands "$@"
}
(( $+functions[_zola__check_commands] )) ||
_zola__check_commands() {
local commands; commands=(

)
_describe -t commands 'zola check commands' commands "$@"
}
(( $+functions[_zola__help_commands] )) ||
_zola__help_commands() {
local commands; commands=(
Expand Down
10 changes: 9 additions & 1 deletion completions/_zola.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ Register-ArgumentCompleter -Native -CommandName 'zola' -ScriptBlock {
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('init', 'init', [CompletionResultType]::ParameterValue, 'Create a new Zola project')
[CompletionResult]::new('build', 'build', [CompletionResultType]::ParameterValue, 'Builds the site')
[CompletionResult]::new('build', 'build', [CompletionResultType]::ParameterValue, 'Deletes the output directory if there is one and builds the site')
[CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Serve the site. Rebuild and reload on change automatically')
[CompletionResult]::new('check', 'check', [CompletionResultType]::ParameterValue, 'Try building the project without rendering it. Checks links')
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Prints this message or the help of the given subcommand(s)')
break
}
Expand Down Expand Up @@ -66,6 +67,13 @@ Register-ArgumentCompleter -Native -CommandName 'zola' -ScriptBlock {
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
break
}
'zola;check' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
break
}
'zola;help' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
Expand Down
68 changes: 43 additions & 25 deletions completions/zola.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ _zola() {
build)
cmd+="__build"
;;
check)
cmd+="__check"
;;
help)
cmd+="__help"
;;
Expand All @@ -32,64 +35,79 @@ _zola() {

case "${cmd}" in
zola)
opts=" -h -V -c --help --version --config init build serve help"
opts=" -h -V -c --help --version --config init build serve check help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

--config)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-c)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;

zola__build)
opts=" -h -V -u -o --help --version --base-url --output-dir "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

--base-url)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-u)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--output-dir)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-o)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
zola__check)
opts=" -h -V --help --version "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
zola__help)
opts=" -h -V --help --version "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
Expand All @@ -98,13 +116,13 @@ _zola() {
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
zola__init)
opts=" -h -V --help --version <name> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
Expand All @@ -113,54 +131,54 @@ _zola() {
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
zola__serve)
opts=" -h -V -i -p -o -u --watch-only --help --version --interface --port --output-dir --base-url "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

--interface)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-i)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--port)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-p)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--output-dir)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-o)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--base-url)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-u)
COMPREPLY=($(compgen -f ${cur}))
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
esac
Expand Down
5 changes: 4 additions & 1 deletion completions/zola.fish
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ complete -c zola -n "__fish_use_subcommand" -s c -l config -d 'Path to a config
complete -c zola -n "__fish_use_subcommand" -s h -l help -d 'Prints help information'
complete -c zola -n "__fish_use_subcommand" -s V -l version -d 'Prints version information'
complete -c zola -n "__fish_use_subcommand" -f -a "init" -d 'Create a new Zola project'
complete -c zola -n "__fish_use_subcommand" -f -a "build" -d 'Builds the site'
complete -c zola -n "__fish_use_subcommand" -f -a "build" -d 'Deletes the output directory if there is one and builds the site'
complete -c zola -n "__fish_use_subcommand" -f -a "serve" -d 'Serve the site. Rebuild and reload on change automatically'
complete -c zola -n "__fish_use_subcommand" -f -a "check" -d 'Try building the project without rendering it. Checks links'
complete -c zola -n "__fish_use_subcommand" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c zola -n "__fish_seen_subcommand_from init" -s h -l help -d 'Prints help information'
complete -c zola -n "__fish_seen_subcommand_from init" -s V -l version -d 'Prints version information'
Expand All @@ -18,5 +19,7 @@ complete -c zola -n "__fish_seen_subcommand_from serve" -s u -l base-url -d 'Cha
complete -c zola -n "__fish_seen_subcommand_from serve" -l watch-only -d 'Do not start a server, just re-build project on changes'
complete -c zola -n "__fish_seen_subcommand_from serve" -s h -l help -d 'Prints help information'
complete -c zola -n "__fish_seen_subcommand_from serve" -s V -l version -d 'Prints version information'
complete -c zola -n "__fish_seen_subcommand_from check" -s h -l help -d 'Prints help information'
complete -c zola -n "__fish_seen_subcommand_from check" -s V -l version -d 'Prints version information'
complete -c zola -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c zola -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
2 changes: 1 addition & 1 deletion components/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Vincent Prouillet <[email protected]>"]

[dependencies]
toml = "0.4"
toml = "0.5"
serde = "1"
serde_derive = "1"
chrono = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions components/errors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Vincent Prouillet <[email protected]>"]

[dependencies]
tera = "1.0.0-alpha.3"
toml = "0.4"
tera = "1.0.0-beta.10"
toml = "0.5"
image = "0.21"
syntect = "3"
4 changes: 2 additions & 2 deletions components/front_matter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ version = "0.1.0"
authors = ["Vincent Prouillet <[email protected]>"]

[dependencies]
tera = "1.0.0-alpha.3"
tera = "1.0.0-beta.10"
chrono = "0.4"
serde = "1"
serde_derive = "1"
toml = "0.4"
toml = "0.5"
regex = "1"
lazy_static = "1"

Expand Down
Loading

0 comments on commit e690226

Please sign in to comment.