Commit Graph

94 Commits

Author SHA1 Message Date
Jake Bauer 76d7d40934 Bump version number 2024-02-19 19:44:27 +01:00
Jake Bauer 1032d72289 Support generating feed from blog posts as index.md files 2024-02-19 19:43:25 +01:00
Jake Bauer 266ac6d026 Remove incompatible use of -z date flag; assume UTC 2024-02-19 19:42:55 +01:00
Jake Bauer 60bbbf6a65 Oh no I forgot to bump the version number 2024-02-16 22:00:01 +01:00
Jake Bauer a881f99378 Fix rendering of sbs.1 build command and cover new features 2024-02-16 18:14:46 +01:00
Jake Bauer 499a810873 Don't copy files if they're older than what has already been copied
Don't copy a file again if it's not newer than whatever is already in
static/. Also, be verbose about which action was taken when -vv flag
given.
2024-02-16 18:05:31 +01:00
Jake Bauer 1d4e11ff7d Handle non-markdown files under content/
This opens support for organising one's site in a way other than having
all markdown files under content/ and all non-markdown files under
static/. This is, in my opinion, a much nicer way to group pages and
the resources they need (images, videos, etc.) instead of having a big
static/img or static/assets directory.
2024-02-16 17:57:03 +01:00
Jake Bauer 470a7e7b95 Add a check to not build files if the content has not changed
Check the modified time of a given input file and the templates and only
build a page if one or more of those are newer than the already-built
output file.
2023-11-16 14:53:07 +01:00
Jake Bauer 84fef97095 Add configuration option to limit number of feeds in generated Atom feed
This stops the feed from growing ad infinitum as more and more content
is added to the site.
2023-07-24 21:46:46 -04:00
Jake Bauer 91b24a20d6 Revert escaping of feed content
This results in double-escaped content since lowdown(1) already
sufficiently escapes the HTML. Escaping was not actually necessary, and
the feed is valid without this.
2023-07-20 14:00:06 -04:00
Jake Bauer ad6cc3933f Bump version number 2023-07-19 17:02:13 -04:00
Jake Bauer 2497158e97 Make Atom feed generator spec-compliant
Ensure dates are in proper RFC 3339 format and that HTML inside of
<content> tags is properly escaped.
2023-07-19 17:00:22 -04:00
Jake Bauer 6d300d35a3 Use OpenBSD's ISC License 2023-04-26 17:55:17 -04:00
Jake Bauer 45b32243cf Fix wrong version number in code, oops! 2023-04-08 14:36:18 -04:00
Jake Bauer 950fd84d7e Make pushcommand only echo if verbosity set 2023-03-17 19:55:59 -04:00
Jake Bauer d542b18646 Use awk to print number of feed entries generated
This fixes an issue where the number was not being displayed on OpenBSD
because the output of `wc -l` was being pre-pended with spaces.
2023-03-17 19:50:43 -04:00
Jake Bauer e74f8b9164 Fix non-portable use of date command
Date is apparently extremely non-portable so limit its use to very
simple printing of current date/time plus timezone instead of trying to
use it to generate date strings.
2023-03-12 11:43:10 -04:00
Jake Bauer ef5a8226bf Update version, readme, and copyright 2023-03-08 19:42:28 -05:00
Jake Bauer e132234c2e Silence output and add verbosity flag
There are two levels of verbosity: -v and -vv. The first prints out
command feedback where sbs would normally not print out anything and the
latter prints out each file as it is being built by the build
subcommand.

sbs has been modified to be silent by default as a result.
2023-03-08 19:11:05 -05:00
Jake Bauer 197b62fd34 Add default CSS to style.css
Generate style.css with ~100 bytes of useful CSS that makes a site
presentable by default.
2023-03-08 18:37:36 -05:00
Jake Bauer 874cae4594 Improve manual
Fix references to gemtext functionality that was removed, link to
lowdown(1), improve wording, etc.
2023-03-08 18:11:57 -05:00
Jake Bauer ba3ac156ca Update README 2023-02-09 23:26:52 -05:00
Jake Bauer d58284804e Bump version number 2023-02-09 22:11:24 -05:00
Jake Bauer 7e8c198031 Update manpage 2023-02-09 22:11:04 -05:00
Jake Bauer 736737aeb1 Remove Gemini to Markdown Conversion Code
I'm moving away from Gemini and don't need this functionality anymore.
Plus, it would have been a bit of a pain to also add the functionality
for making a feed out of Gemini code so Gemini support would have
remained half-baked. A dedicated tool for Gemini is a better solution.
2023-02-09 22:00:58 -05:00
Jake Bauer 0bae1d80d7 Change pushcmd to pushCommand 2023-02-09 22:00:23 -05:00
Jake Bauer 7afbde68ca Add confirmation prompt in case something will be overwritten
This stops the user from accidentally overwriting a file full of content
or resetting a website directory when using commands such as 'sbs new
page' or 'sbs new site'.
2022-10-28 18:27:39 -04:00
Jake Bauer 44f89f89c0 Add exclusion for index page in feed generation 2022-10-05 11:09:38 -04:00
Jake Bauer d4cb1aba1d Bump version number 2022-09-15 16:53:04 -04:00
Jake Bauer bfd9735e75 Properly escape title and description fields
Previously, if you had a '/' or some other character recognized by sed
as a special regex character in the title or description of a page, that
page would fail to build. This adds a couple lines that runs those bits
of text through a separate sed command to escape any such special
characters and prevent those issues.
2022-09-15 16:51:02 -04:00
Jake Bauer 87e0f3ef2b Bump version number 2022-08-21 15:04:43 -04:00
Jake Bauer 512e93108e Fix incorrect titles & descriptions being applied
The title and description variables were not being unset before each
invocation of the build() function so pages would have incorrect titles
and descriptions, since those variables would only be set if they were
not already set (from a Gemini conversion).
2022-08-21 15:04:11 -04:00
Jake Bauer cc1992d1d0 Improve documentation 2022-08-20 19:17:07 -04:00
Jake Bauer 885ed0981d Translate image links into Markdown image links
If a gemini link points to a .jpeg, .jpg, or .png file, translate that
link into a Markdown-style image link (i.e. a link with a ! preceding
it) so that it will be compiled into an <img> tag for better viewing in
web browsers.
2022-08-20 19:07:52 -04:00
Jake Bauer faa1a6b9a8 Bump version number 2022-08-19 19:55:07 -04:00
Jake Bauer b2da399907 Add ability to build pages from any subdirectory
These changes allow one to build a page without having to go back up to
the root directory of the website. This should reduce deployment
friction when quickly iterating on a page or series of pages.
2022-08-19 19:54:35 -04:00
Jake Bauer 3e841adac8 Support arbitrary number of spaces in Gemini link format
According to the gemtext specification, it's completely fine for there
to be zero or any number of spaces between the '=>' that denotes a link
and the following URL. This change allows that, instead of assuming
there will always be just one space after the '=>'.
2022-08-19 15:15:38 -04:00
Jake Bauer 748af06ed5 Fix support for Gemini links with optional label
Previously, if a Gemini link did not have a label, then sbs would skip
converting it to a Markdown-style link. For example:

=> /this/is/a/link.gmi

would not get converted whereas:

=> /this/is/a/link.gmi Link

would get converted. Since the label is optional according to the
gemtext specification, we need to support these situations.
2022-08-18 23:05:30 -04:00
Jake Bauer f7ef8e5efb Fix bug with output folder path when building entire site 2022-08-17 22:43:33 -04:00
Jake Bauer 051191be2a Improve comments in sbs code 2022-08-17 22:43:11 -04:00
Jake Bauer 70a244abd7 Update README 2022-08-17 19:59:02 -04:00
Jake Bauer 95b4d4a51c Bump version number 2022-08-17 19:50:14 -04:00
Jake Bauer 56aef8bf0d Fix conversion of gmi links without leading slash
If a link was something like:

=> git.gmi A Page About Git

Then sbs wouldn't convert the link to "git.html" since it was looking
for links that had a leading slash.
2022-08-17 19:48:38 -04:00
Jake Bauer 2fc235eaa9 Bump version number 2022-08-17 19:35:22 -04:00
Jake Bauer 5a16652e9c Add missing documentation 2022-08-17 19:35:11 -04:00
Jake Bauer 5092b0a5d0 Update documentation 2022-08-17 18:43:00 -04:00
Jake Bauer ffbd95acd9 Improve build command with Gemini support
sbs can now convert gemtext to markdown which allows mixing gemini and
markdown in the same site directory and easy publishing of gemini
content for the web.

A modification of the build command was also added to allow building the
entire site without specifying any paths.
2022-08-17 18:42:59 -04:00
Jake Bauer fba8da8d11 Fix missing newlines for error messages 2022-08-17 18:42:59 -04:00
Jake Bauer a0b801f064 Add "push" command to facilitate quick publishing
The push command executes an arbitrary command specified in config.ini
under the "pushcmd" variable.
2022-08-17 18:42:54 -04:00
Jake Bauer 766ca83d02 Update README 2022-06-23 06:17:33 -04:00