Commit Graph

66 Commits

Author SHA1 Message Date
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
Jake Bauer d080d15e9e Bump version number 2022-06-23 06:05:36 -04:00
Jake Bauer 3aa52dbb0e Create manpage 2022-06-23 06:01:55 -04:00
Jake Bauer c05a650fe2 Auto-create blank style.css file for new sites 2022-06-23 05:10:39 -04:00
Jake Bauer 3131809d07 Fix incorrect CSS file name in <head> tags 2022-06-23 04:09:57 -04:00
Jake Bauer f556a03890 Fix title tag replacement 2022-04-27 11:33:17 -04:00
Jake Bauer a9a71b687f Fix atom feed embedded content type and links
Embedded content type was set to `text` when it should have been `html`
to tell clients that HTML was the format of the embedded content. It was
previously `text` because either the documentation for Atom feeds
(https://validator.w3.org/feed/docs/atom.html#text) is terrible or all
the clients do their own thing when it comes to parsing content.

Links to content weren't being properly munged so links included
`/content/blog` instead of just `/blog` and that resulted in broken
links.
2022-03-19 15:25:22 -04:00
Jake Bauer 359cc142d6 Bump version number 2022-02-22 16:26:24 -05:00
Jake Bauer 67142daff1 Fix up new post and new page commands 2022-02-22 16:21:49 -05:00
Jake Bauer 5c73ec2841 Refactor into functions+switch-case 2022-02-22 16:21:36 -05:00
Jake Bauer 0878a83fa8 Add version command 2022-02-22 15:26:22 -05:00
Jake Bauer 7a966eaf61 Pipe commands into while loops (SC2044) 2022-02-22 15:17:24 -05:00
Jake Bauer 4fb81b9cc7 Add helptext printout 2022-02-22 14:58:51 -05:00
Jake Bauer e5b24b78d3 Make 'build' command explicit 2022-02-22 14:11:51 -05:00
Jake Bauer 4bb58b9245 Group printf statements 2022-02-22 14:02:40 -05:00
Jake Bauer 4ff916dd83 Add quotes to prevent shell globbing 2022-02-22 14:01:28 -05:00
Jake Bauer 244c11495e Fix use of variables in printf format strings 2022-02-22 13:38:58 -05:00
Jake Bauer 38b235203f Fix bug with interpretation of find -name argument 2022-02-15 02:01:42 -05:00
Jake Bauer ee18195d11 Minor update to README 2022-02-15 01:36:20 -05:00
Jake Bauer 579fd8ce9a Update documentation 2022-02-15 01:25:04 -05:00
Jake Bauer f559095f3a Add unknown command handling 2022-02-15 01:12:29 -05:00
Jake Bauer ff2462db20 Fix format of printf strings 2022-02-15 01:12:18 -05:00
Jake Bauer 24425d7e98 Add command to make new page in addition to new post 2022-02-15 01:11:51 -05:00
Jake Bauer 9fa7c63b3a Fix new site and page generation
Config parsing was done too early so the code had to be refactored to
allow new site and post creation without worrying about the contents of
the config file since neither of them depend on it.
2022-02-15 01:02:47 -05:00
Jake Bauer 65ab9ca6dc Fix Atom feed generation
It now validates with https://validator.w3.org/feed/ and produces proper
embedded HTML output.
2022-02-15 00:31:45 -05:00
Jake Bauer e2af53afe6 Validate format of siteURL 2022-02-15 00:31:14 -05:00
Jake Bauer ef9eb307ee Improve page generation message output 2022-02-14 23:46:52 -05:00
Jake Bauer 2731e45e20 Skip directory when recursing 2022-02-14 23:46:25 -05:00
Jake Bauer 62358adeb6 Remove extra slash from filepath for blog articles 2022-02-14 23:45:43 -05:00