summaryrefslogtreecommitdiff
path: root/src/collect_files.rs
Commit message (Collapse)AuthorAge
* Set last-modified time of generated files same as source fileBen Bridle2025-02-01
| | | | | | | | | | | | | When generating a file from a source file, the last-modified time of the generated file will be set to be the same as the last-modified time of the source file. This is so that when copying the generated website to a server with rsync, only modified files will be copied over, saving considerable time. This commit also updates vagabond to the latest version which includes a change where files are only copied if they have been modified or if they haven't yet been copied. This saves considerable time when generating the website, if the website contains large static files.
* Remove 'appendix' from the links of appendix headingsBen Bridle2025-01-22
| | | | | | If a heading is prefixed with 'Appendix #:', the link to that heading will not include that prefix. This is to make it possible to rearrange appendices in a document without breaking existing links.
* Update supported markdown syntaxBen Bridle2025-01-19
| | | | | Added math blocks, and changed link syntax, embedded file syntax, and bold line element syntax.
* Log when the configuration file is parsedBen Bridle2025-01-19
|
* Check that links to static files are validBen Bridle2025-01-18
| | | | | | | | | | When a link doesn't contain a protocol, it's assumed to be a link to a relative or absolute path to an internal static file. This link is checked against the list of collected static files to ensure that it exists. For an unlabelled link to an internal static file, the label will be the file name without preceding path segments.
* Fix panic when internal link has no path segmentsBen Bridle2025-01-18
| | | | | This was being triggered when an internal link was given as [[/]], which is admittedly an invalid link anyway.
* Fix internal links to headings on another pageBen Bridle2025-01-18
| | | | | | The heading section of the link wasn't being suffixed to the generated link target, so links to a heading on another page were just regular links to the top of that page.
* Implement image galleriesBen Bridle2025-01-15
| | | | | | Each gallery image must be kept in the three directories images/large, images/small, and images/thumb. A gallery is a fragment with the language 'gallery' containing a list of image filenames, one per line.
* Implement redirectsBen Bridle2025-01-15
| | | | | Source files with extension .redirect will be converted into redirect pages linking to the internal-style URL in each file.
* Implement a config file formatBen Bridle2025-01-14
| | | | | | If the file `toaster.conf` is found in the root of the source directory, the contents are parsed as key-value pairs. A line with no indentation is a key, and all following indented lines are the value.
* Detect duplicate headings within a pageBen Bridle2025-01-14
| | | | | | This is an issue because the duplicate headings will have identical ids, and all links to the lower heading will instead link to the upper heading.
* Rewrite link handling and add navigation features to generated HTMLBen Bridle2025-01-09
|
* More robust file traversal logicBen Bridle2025-01-08
File traversal can now cope with symbolic links. The original path to each file is preserved where before they were unintentionally canonicalized, so the source folder prefix can now be correctly stripped from the path of each source file. This commit also adds the !folder syntax from the original toaster. Directories with a !-prefix are copied without modification to the site root. A --delete option has been added to the program. When this option is set, the destination directory is first deleted if it already exists.