Commit graph

159 commits

Author SHA1 Message Date
Vincent Prouillet
278cc82fc7
Change zola serve to load HTML from memory instead of disk (#1114)
* Change zola serve to load HTML from memory instead of disk

* Be smart about assets copying

* Be a tiny bit smarter on template changes

* Add zola serve --fast
2020-08-16 18:39:04 +02:00
René Ribaud
261a2eee01
Docs/configuration update (#1126)
* Update configuration documentation

- Attempt to split the configuration file into sections to make it more readable and
  avoid configuration mistakes (#1056).
- Move translation instructions to the right part.
- Add a bit more explanations to the extra section.

* Take into account @Keats feedbacks

* Remove short notice about translation usage

- A i18n page should be created to better explain it.
2020-08-16 18:25:52 +02:00
René Ribaud
274a5be6f5
Fix title level of check command (#1125) 2020-08-12 22:46:07 +02:00
Jakub Neander
39eed4fdee
add OneHalf Light/Dark theme (#1116) 2020-08-03 20:08:17 +02:00
Peter H. Ezetta
b359cca4fe
adding OpenBSD installation instructions (#1109) 2020-07-30 11:03:01 +02:00
Sven-Hendrik Haase
26a5a368d3
Zola is now available in the official Arch repos (#1089) 2020-07-19 10:51:03 +02:00
Vincent Prouillet
fb994c71d7 Make search index configurable
Closes #961
2020-06-29 20:02:27 +02:00
Per Lundberg
530f918955
Add --force/-f flag to init, for creation in non-empty dir (#1065) 2020-06-18 21:15:46 +02:00
2mol
47bd7c9e82
fix material-light theme link (#1066) 2020-06-17 11:03:06 +02:00
Vincent Prouillet
a3a5b9ea06
Merge pull request #976 from getzola/next
0.11.0
2020-05-25 18:14:42 +02:00
Hannu Hartikainen
a7657f30ab
Use {{ page.permalink | safe }} in tutorial (#1024)
The `/` urls are confusing to newcomers (at least myself). Use the best practice in the tutorial (see issue #129).
2020-05-13 08:40:06 +02:00
Vincent Prouillet
bc496e6101 Update syntaxes and syntect 2020-04-29 22:35:28 +02:00
Chris Morgan
e25915b231 Support and default to generating Atom feeds
This includes several breaking changes, but they’re easy to adjust for.

Atom 1.0 is superior to RSS 2.0 in a number of ways, both technical and
legal, though information from the last decade is hard to find.
http://www.intertwingly.net/wiki/pie/Rss20AndAtom10Compared
has some info which is probably still mostly correct.

How do RSS and Atom compare in terms of implementation support? The
impression I get is that proper Atom support in normal content websites
has been universal for over twelve years, but that support in podcasts
was not quite so good, but getting there, over twelve years ago. I have
no more recent facts or figures; no one talks about this stuff these
days. I remember investigating this stuff back in 2011–2013 and coming
to the same conclusion. At that time, I went with Atom on websites and
RSS in podcasts. Now I’d just go full Atom and hang any podcast tools
that don’t support Atom, because Atom’s semantics truly are much better.

In light of all this, I make the bold recommendation to default to Atom.

Nonetheless, for compatibility for existing users, and for those that
have Opinions, I’ve retained the RSS template, so that you can escape
the breaking change easily.

I personally prefer to give feeds a basename that doesn’t mention “Atom”
or “RSS”, e.g. “feed.xml”. I’ll be doing that myself, as I’ll be using
my own template with more Atom features anyway, like author information,
taxonomies and making the title field HTML.

Some notes about the Atom feed template:

- I went with atom.xml rather than something like feed.atom (the .atom
  file format being registered for this purpose by RFC4287) due to lack
  of confidence that it’ll be served with the right MIME type. .xml is a
  safer default.

- It might be nice to get Zola’s version number into the <generator>
  tag. Not for any particularly good reason, y’know. Just picture it:

    <generator uri="https://www.getzola.org/" version="0.10.0">
	Zola
    </generator>

- I’d like to get taxonomies into the feed, but this requires exposing a
  little more info than is currently exposed. I think it’d require
  `TaxonomyConfig` to preferably have a new member `permalink` added
  (which should be equivalent to something like `config.base_url ~ "/" ~
  taxonomy.slug ~ "/"`), and for the feed to get all the taxonomies
  passed into it (`taxonomies: HashMap<String, TaxonomyTerm>`).
  Then, the template could be like this, inside the entry:

    {% for taxonomy, terms in page.taxonomies %}
        {% for term in terms %}
            <category scheme="{{ taxonomies[taxonomy].permalink }}"
		term="{{ term.slug }}" label="{{ term.name }}" />
	{% endfor %}
    {% endfor %}

Other remarks:

- I have added a date field `extra.updated` to my posts and include that
  in the feed; I’ve observed others with a similar field. I believe this
  should be included as an official field. I’m inclined to add author to
  at least config.toml, too, for feeds.
- We need to have a link from the docs to the source of the built-in
  templates, to help people that wish to alter it.
2020-04-14 17:27:08 +05:30
SasakiSaki
073e24659d
Add highlight for lyric (#949)
* Add highlight for lyric files

* Add highlight theme nyx-bold

* Update the documents

* Add highlight for subtitle files
2020-02-21 14:14:25 +01:00
Vincent Prouillet
ac3ced828b
Multiple slugification strategies (#929) 2020-02-05 09:13:14 +01:00
Vincent Prouillet
782cc7d686 Fix some more merge conflicts 2020-02-02 17:50:36 -08:00
ethereal
94445ae745 Add --root global argument. Fixes #899. (#932) 2020-02-02 17:48:43 -08:00
photong
5ba4d47538 Docs next (#858)
* Update installation.md

* Update cli-usage.md

* Update installation.md

* Update directory-structure.md

* Update configuration.md

* Update overview.md

* Update section.md

* Update page.md

* Update section.md

* Update configuration.md

* Update page.md

* Update section.md

* Update page.md

* Update shortcodes.md

* Update linking.md

* Update table-of-contents.md

* Update syntax-highlighting.md

* Update taxonomies.md

* Update search.md

* Update sass.md

* Update index.md

* Update multilingual.md

* Update overview.md

* Update pages-sections.md

* Update pagination.md

* Update taxonomies.md

* Update rss.md

* Update sitemap.md

* Update robots.md

* Update 404.md

* Update archive.md

* Update overview.md

* Update installing-and-using-themes.md

* Update creating-a-theme.md

* Update netlify.md

* Update github-pages.md

* Update gitlab-pages.md

* Updates.

* Skip link checking for URL with prefix in config (#846)

* Fix some doc changes

* Section extra -> SitemapEntry (#850)

* Update deps

* Remove tutorial link.

* Update overview.md

* Update page.md

* Update section.md

* Update netlify.md

* Update overview.md

* Change some wording.

* Update overview.md

Co-authored-by: Tjeu Kayim <15987676+TjeuKayim@users.noreply.github.com>
Co-authored-by: Vincent Prouillet <balthek@gmail.com>
Co-authored-by: Stan Rozenraukh <stan@stanistan.com>
2020-02-02 17:48:43 -08:00
Vincent Prouillet
ceb9bc8ed7 Optionally do not slugify paths (#875)
* maybe_slugify() only does simple sanitation if config.slugify is false

* slugify is disabled by default, turn on for backwards-compatibility

* First docs changes for optional slugification

* Remove # from slugs but not &

* Add/fix tests for utf8 slugs

* Fix test sites for i18n slugs

* fix templates tests for i18n slugs

* Rename slugify setting to slugify_paths

* Default slugify_paths

* Update documentation for slugify_paths

* quasi_slugify removes ?, /, # and newlines

* Remove forbidden NTFS chars in quasi_slugify()

* Slugification forbidden chars can be configured

* Remove trailing dot/space in quasi_slugify

* Fix NTFS path sanitation

* Revert configurable slugification charset

* Remove \r for windows newlines and \t tabulations in quasi_slugify()

* Update docs for output paths

* Replace slugify with slugify_paths

* Fix test

* Default to not slugifying

* Move slugs utils to utils crate

* Use slugify_paths for anchors as well
2020-02-02 17:48:43 -08:00
Vincent Prouillet
1a6edbcf63 Fix some doc changes 2020-02-02 17:48:42 -08:00
photong
51d4b6bd6a Simple clean up of documentation. (#849)
* Update installation.md

* Update cli-usage.md

* Update installation.md

* Update directory-structure.md

* Update configuration.md

* Update overview.md

* Update section.md

* Update page.md

* Update section.md

* Update configuration.md

* Update page.md

* Update section.md

* Update page.md

* Update shortcodes.md

* Update linking.md

* Update table-of-contents.md

* Update syntax-highlighting.md

* Update taxonomies.md

* Update search.md

* Update sass.md

* Update index.md

* Update multilingual.md

* Update overview.md

* Update pages-sections.md

* Update pagination.md

* Update taxonomies.md

* Update rss.md

* Update sitemap.md

* Update robots.md

* Update 404.md

* Update archive.md

* Update overview.md

* Update installing-and-using-themes.md

* Update creating-a-theme.md

* Update netlify.md

* Update github-pages.md

* Update gitlab-pages.md

* Update index.md

* Update page.md

* Update section.md

* Updates.
2020-02-02 17:48:42 -08:00
Tjeu Kayim
75570d041a Skip link checking for URL with prefix in config (#846) 2020-02-02 17:47:01 -08:00
Tjeu Kayim
6149fd17e1 Skip anchor checking for URL with prefix in config (#812)
* cargo fmt & clippy

* Skip anchor checking for URL with prefix in config
2020-02-02 17:45:16 -08:00
Vincent Prouillet
cb4056c0f2 Add zenburn theme
Closes #813
2020-02-02 17:44:38 -08:00
Vincent Prouillet
6856b11d6d Looks like it now requires 1.36 2020-02-02 17:44:38 -08:00
David Authier
f4b6f63d3c 📝 Add TOML translations key example (#864) 2019-11-28 19:18:52 +01:00
Bob
9db9fc8fb2 Fix the issue of generating the search index for multiple language (#794)
* fix the issue of generating the search index for multiple language

* updat docs for generating the search index for multiple language

* fix failed tests

* add tests for the search index of multiple language
2019-09-03 16:50:23 +02:00
Vincent Prouillet
b396a1bc20 Add --drafts flag + rustfmt 2019-08-24 22:23:08 +02:00
BilLOPGVkPPn8z0JGJhgiAGNo9YAqpk5ruChl0F
258aecec34 Add one-dark syntax highlight theme (#784) 2019-08-24 19:06:41 +02:00
Vincent Prouillet
f0c48b8a14 Add some more text to zola init
Closes #773
2019-08-13 20:16:09 +02:00
southerntofu
13b395b536 zola init works inside existing directories (closes #406) (#777)
* zola init works without argument (defaults to current directory)

* zola init works with existing folders (no non-hidden files permitted)

* Update zola init documentation

* [docs] Optional argument is on a separate line for clarity

* Add tests for init subcommand's respect of existing folders
2019-08-13 19:56:57 +02:00
Vincent Prouillet
7f459940e1 Allow multiple taxonomies with same name in different language
Closes #766
2019-08-10 18:54:32 +02:00
Hendrik Sollich
9f46048c0e Add Tomorrow theme (#749) 2019-07-16 17:22:02 +02:00
Jakub Turski
8a737d71fb Add an option to hard link files from static/ instead of copying. (#723)
* Add hard_link_static config option.

* Copy or hardlink file depending on an argument.

Modify the call sites for `copy_file` to account for the extra argument.

* Plug the config setting through to copy_file.

Don't apply the config option to theme's static directory.

* Update documentation.

* Backticks make no sense in this comment.

* Addressing PR comments.

* Be consistent with argument naming.
2019-07-12 22:54:18 +02:00
Tim Visée
90dad05c67 Add --open flag to serve command, to open URL in default browser (#739)
* Add --open flag to serve command, to open URL in default browser

* Mention serve --open flag in CLI documentation
2019-07-12 22:54:18 +02:00
Jakub Turski
79dfe92bbf Update cli-usage.md (#729)
* Update cli-usage.md

* clarify that it's only the links from markdown files that are being checked;
2019-07-12 22:54:18 +02:00
Tobias Kortkamp
6895ae5b10 docs: Add installation on FreeBSD (#741) 2019-07-10 21:39:30 +02:00
Igor Gnatenko
a49daa7463 docs: Add installation on Fedora (#734) 2019-06-30 18:10:21 +02:00
Vincent Prouillet
e6902264ef
Merge pull request #678 from getzola/next
0.8.0
2019-06-22 11:48:56 +02:00
Bridouz
089278faa7
Add url for base16 syntax highlighting examples 2019-06-17 10:08:05 +02:00
Vincent Prouillet
ec61a57841 Use @/ for internal links rather than ./
Close #686
2019-05-27 14:35:18 +02:00
Vincent Prouillet
cdfd63a1ad Add zola check to changelog and remove check option from config doc 2019-05-27 14:16:46 +02:00
Marcus Klaas de Vries
0d964204c3 Check command global (#683)
* Add check subcommand

* Add some brief documentation for the check subcommand

* Start working on parallel link checks

* Check all external links in Site

* Return *all* dead links in site
2019-05-27 14:05:07 +02:00
Vincent Prouillet
debe0633bc Revert "Allow default base-path command line option to be set for building and serving"
This reverts commit 1815155c1d.
2019-04-20 12:50:34 +02:00
Vincent Prouillet
78c8f9cd59 Add note about Powershell ISE
Closes #530
2019-03-25 23:17:37 +01:00
Vincent Prouillet
5d695d7ce8
Merge pull request #567 from getzola/next
v.0.6.0
2019-03-25 20:26:07 +01:00
Blake Smith
1815155c1d Allow default base-path command line option to be set for building and serving 2019-03-23 20:25:56 -05:00
Eli Flanagan
ce0f0ec935 use nix-shell to build on nixos
Fix #616. Add brief documentation for how to use it.
2019-02-19 19:23:27 -05:00
Vincent Prouillet
723729b6d1
Merge branch 'master' into next 2019-02-16 15:49:19 +01:00
Leonardo Schwarz
77aad07dc6 Revert "Update snap installation instructions"
This reverts commit 5fd7bf7e61.

Apparently it is not just no longer necessary to use classic
confinement, but actually impossible, i.e. snap emits an error that the
zola snap is not compatible with `--classic`.
2019-02-05 11:09:18 +01:00
Ryan McGrath
0bcc706a55
One more time, Dracula theme, lol 2019-01-15 14:20:47 -08:00
Vincent Prouillet
cae9223ebd Mention that serve deletes the public dir as well 2019-01-07 19:24:08 +01:00
Vincent Prouillet
0f0304d7ed Mention build rm the directory 2019-01-05 11:04:12 +01:00
Vincent Prouillet
288917b42d Pest now requires 1.31 2018-12-29 11:38:28 +01:00
Vincent Prouillet
779511ae43 Pass down lang and start docs 2018-12-28 13:24:49 +01:00
Luke Peterson
825152242d Remove redundant "From Source" documentation 2018-12-15 08:35:09 -08:00
Vincent Prouillet
5eebbc68de
Merge branch 'master' into next 2018-12-14 17:35:50 +01:00
Vincent Prouillet
f193152c85 Looks like it needs 1.30? 2018-12-14 17:35:18 +01:00
Bob "Wombat" Hogg
d8693ef1f8
Mark required Rust version as 1.29
690b3f9 updated the required version in Cargo.lock and in the CI config files, but not in the installation instructions.
2018-12-11 10:58:53 -08:00
Vincent Prouillet
fb4c562088 Removing gutenberg completely from installation instructions 2018-11-30 22:23:18 +01:00
Igor Kapkov
a6ec2b65c7
Update brew docs 2018-11-30 19:37:14 +11:00
Bob "Wombat" Hogg
5fd7bf7e61
Update snap installation instructions
If you don't install with classic confinement, you'll get permission errors trying to create sites with `zola init`.
2018-11-28 22:16:40 -07:00
Vincent Prouillet
34da6fdffd yaourt -> yay 2018-11-19 17:27:15 +01:00
Chris
cec89dea94
Fixed wrong heading
Changed arch linux from h2 to h3
2018-11-19 16:36:07 +01:00
Chris
a1aa7cb4c5
Updated install instructions
I updated the install instructions (snap, scoop, chocolatey) and added the ones where Gutenberg already got renamed to Zola also to the top of the document.

Should yaourt be replaced by one of the other aur-helpers (pikaur, yay,...) as the development for it is stalled/discontinued for quite some time now although it is still working?

Scoop: https://github.com/lukesampson/scoop/blob/master/bucket/zola.json
Chocolatey: https://chocolatey.org/packages/zola
Snap: https://snapcraft.io/zola
2018-11-19 16:34:39 +01:00
Vincent Prouillet
29b8dffe27 Update docs for install/netlify deploy for zola/gutenberg 2018-11-12 19:58:46 +01:00
Vincent Prouillet
39bcbd70d0
Merge pull request #517 from gsomix/patch-1
Add info about chocolatey package
2018-11-12 14:24:05 +01:00
Evgeniy Andreev
070280021d
Add info about chocolatey package 2018-11-12 12:20:37 +04:00
Robert Masen
43cac703a3 add --watch-only to docs 2018-11-01 17:36:47 -05:00
Vincent Prouillet
c05f7c8362
Merge branch 'master' into next 2018-10-31 08:41:20 +01:00
Vincent Prouillet
8a6d3d42ec Add ayu highlighting theme 2018-10-26 20:04:56 +02:00
Vincent Prouillet
0101e5cb12 Update docs to refer to zola 2018-10-18 23:11:36 +02:00
Elias Roa
dd13f30a41 Minor documentation typo fixes 2018-10-10 15:21:58 -06:00
Chris Krycho
56c5036abc
Allow inclusion of all items in RSS feeds.
Switch to an `Option<usize>` for the serialized value of `rss_items`.
This lets us just set a blank value in the configuration and thereby
include *all* items.

This is a backwards-compatible change; it does not affect the behavior
of existing configurations.

Fixes #468. Closes #471.
2018-10-09 20:20:09 -06:00
Jonathan Watt
4c96f2ec17 Fix the spelling of "macOS" 2018-10-07 18:17:33 +01:00
Greizgh
b8233af2c4 Allow to disable colors through env vars
- unless forced, only use colors in tty
- support CLICOLOR and NO_COLOR vars
- switch to termcolor crate to handle output coloring
2018-09-24 19:19:34 +02:00
Vincent Prouillet
cf5f22135f Some more info on installation 2018-09-18 12:13:00 +02:00
Vincent Prouillet
014ce878f8
Merge pull request #368 from Keats/next
Next version
2018-09-03 19:39:10 +02:00
Cameron Dershem
15b74b2907 Updates docs to match proper toml syntax. 2018-08-29 18:56:21 -04:00
Nathan Ringo
48391dbafb
extra_syntaxes documentation 2018-08-14 09:54:24 -05:00
Vincent Prouillet
4f418a11b4 Fix live reload of section content 2018-08-05 10:30:01 +02:00
Vincent Prouillet
84a3193e97 Last fixes 2018-08-03 19:47:39 +02:00
Vincent Prouillet
3e48ff24b5 Add an external link checker
Close #115
2018-07-16 21:15:50 +02:00
Vincent Prouillet
18bef00671 Rename taxonomies paginate and error on unknown ones 2018-07-16 18:14:48 +02:00
Vincent Prouillet
1ae0702494
Custom taxonomies (#330) 2018-07-16 10:54:05 +02:00
Isaac Andrade
486c979761 Fix documentation typos and minor changes:
- Fix some typos
- Some small changes to documentation to make it more clear
- Change the themes list from text to links
2018-04-01 18:33:59 -06:00
Vincent Prouillet
73ddbf7152 Write some docs 2018-03-21 16:18:24 +01:00
Vincent Prouillet
43db3a43ff Do not require themes to have a static folder 2018-03-18 09:34:37 +01:00
Vincent Prouillet
2eacb8247b Fix config CLI option
Closes #254
2018-03-16 19:11:12 +01:00
Vincent Prouillet
217738d0c8 Update list of themes 2018-03-01 10:37:35 +01:00
Philip Daniels
3e1221064b Filter ignored content in page.rs.
* Add ignored_content to the Config structure.
* Use the GlobSet crate to parse the glob patterns into a matcher, which
  is created once at program initialization. If there are no patterns in
  ignored_content, an empty globber is created, which excludes no files.
  This is consistent with the existing behaviour of Gutenberg, before
  this feature was added.
* Bail if there are any errors in the glob patterns.
* Add a call to the globber in page.rs to actually do the filtering.
* Update documentation.

A note on the Config structure
------------------------------
* I had to remove the PartialEq derive from the Config structure as it
  does not work for the GlobSet type. No harm is done, Config does not
  need to be PartialEq anyway, since there is no need to sort Configs.
* The implementation follows the pattern of the existing config settings
  in that it uses an Option<...>. This would appear unnecessary, in that
  an empty vec could be used as the default, but it appears to be needed
  by the TOML parsing. A better approach would be to use a separate
  SerializableConfig and map to/from a Config struct. This would also
  allow the elimination of most, if not all, of the other Options in
  the Config structure, but that ought to be another PR.
2018-02-25 15:15:51 +00:00
Vincent Prouillet
f7cacba3f0 Update deps and changelog 2018-02-02 17:35:03 +01:00
Andrew Zah
f5ced05926 Separate interface and base url for gutenberg serve (#223)
Separate interface and base_url for serve

You can now have a different base_url and listening interface.
The `gutenberg serve` cmd now accepts `-u`/`--base-url`, but it defaults to `127.0.0.1`.
2018-02-02 17:18:07 +01:00
Vincent Prouillet
c165c17c2f
Merge pull request #175 from Keats/next
Next version
2018-01-25 14:33:53 +01:00
Sven-Hendrik Haase
462365642d
Proper Arch Linux spelling
It's either Arch Linux or archlinux but never Archlinux or ArchLinux.
2018-01-23 12:48:18 +01:00
Vincent Prouillet
f3b1553a26 Update docs about trans 2018-01-16 13:57:31 +01:00
Vincent Prouillet
14edd2b875 Add output-dir option to build & serve
From #191
2017-12-29 19:26:17 +01:00
Carson Page
193d0184f0 Added installation method for Void Linux 2017-11-08 20:39:09 -06:00
Vincent Prouillet
3f9d39481d Add brew installation & contributing doc 2017-11-01 16:31:58 +01:00
Vincent Prouillet
7cf120d0da Add scoop install instructions 2017-10-21 09:48:29 +02:00