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'.
Add exclusion for index page in feed generation
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.
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).
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
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.
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 '=>'.
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:
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.
Fix bug with output folder path when building entire site
Improve comments in sbs code
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.
Add missing documentation