summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <git@mx.buetow.org>2021-05-25 22:07:34 +0100
committerPaul Buetow <git@mx.buetow.org>2021-05-25 22:07:34 +0100
commitb7489882bc82e4266e9cb9845604acdf20857c23 (patch)
treece5e9e8be5890762c58bf6ae3a7db1cbb87265e9
parentccadfe16dd8c41e580ff39ec783093739d7d1f6c (diff)
fix grammar
-rw-r--r--README.md28
-rw-r--r--packages/generate.source.sh3
2 files changed, 16 insertions, 15 deletions
diff --git a/README.md b/README.md
index 2f87a33..ce0ad0d 100644
--- a/README.md
+++ b/README.md
@@ -23,15 +23,15 @@ These are the requirements of the `gemtexter` static site generator script:
* GNU Date
* Git
-The script was tested on a recent Fedora Linux. For *BSD or macOS you would need to install GNU Sed, GNU Date, and a newer version of Bash.
+The script is tested on a recent Fedora Linux. For *BSD or macOS, you would need to install GNU Sed, GNU Date, and a newer version of Bash.
## Usage
So you want such a pretty internet site too?
-To get started, just clone this repo and run `./gemtexter`. You will will be prompted with further instructions.
+To get started, clone this repo and run `./gemtexter`. You will be prompted with further instructions.
-You will notice soon, that all site content is located in `../buetow.org-content/` (you can configure the `$BASE_CONTENT_DIR` in `gemtexter.conf`). There is one sub-directory per output format, e.g.:
+You will notice soon that all site content is located in `../buetow.org-content/` (you can configure the `$BASE_CONTENT_DIR` in `gemtexter.conf`). There is one sub-directory per output format, e.g.:
```
../buetow.org-content/gemtext
@@ -51,24 +51,24 @@ export CONFIG_FILE_PATH=~/.config/my-site.geek.conf
### What is what
-Whereas, you only want to directly edit/add/remove content in the `gemtext` folder. The `gemtexter` then will take the Gemtext and update all other formats accordingly. Summary of what is what is:
+Whereas you only want to edit the content in the `gemtext` folder directly. The `gemtexter` then will take the Gemtext and update all other formats accordingly. Summary of what is what:
* `gemtext`: The Gemini Gemtext markup files of the internet site.
* `html`: The XHTML version of it.
* `md`: The Markdown version of it.
-* `meta`: Some meta data of all Gemtext blog posts. It's used by `gemtexter` internally for Atom feed generation.
+* `meta`: Some metadata of all Gemtext blog posts. It's used by `gemtexter` internally for Atom feed generation.
### Special HTML configuration
You will find the `./header.html.part` and `./footer.html.part` files, they are minimal template files for the HTML generation.
-### Special Markdown configuraiton
+### Special Markdown configuration
-`gemtexter` will never touch the `../$BASE_CONTENT_DIR/md/_config.yml` file (if it exists). That's a special configuration file for GitHub Pages.
+`gemtexter` will never touch the `../$BASE_CONTENT_DIR/md/_config.yml` file (if it exists). That's a particular configuration file for GitHub Pages. `gemtexter` also will never modify the file `../$BASE_CONTENT_DIR/md/CNAME`, as this is also a file required by GitHub pages for using custom domains.
## Store all formats in Git
-I personally have for each directory in `../buetow.org-content/` a separate Git repository configured. So whenever something has changed it will be updated/added/removed to version control. The following will run the generator and commit everything to Git:
+I personally have for each directory in `../buetow.org-content/` a separate Git repository configured. So whenever something has changed, it will be updated/added/removed to version control. The following will run the generator and commit everything to Git:
```
USE_GIT=yes ./gemtexter --generate
@@ -84,18 +84,18 @@ You could add the `USE_GIT` and `GIT_PUSH` options to the `gemtexter.conf` confi
## Publishing a blog post
-All what needs to be done is to create a new file in `./gemtext/gemfeed/YYYY-MM-DD-article-title-dash-separated.gmi`, whereas `YYYY-MM-DD` defines the publishing date of the blog post.
+All that needs to be done is to create a new file in `./gemtext/gemfeed/YYYY-MM-DD-article-title-dash-separated.gmi`, whereas `YYYY-MM-DD` defines the publishing date of the blog post.
-A subsequent `./gemtexter --generate` will then detect the new post and link it from `$BASE_CONTENT_DIR/gemtext/gemfeed/index.gmi`, link it from the main index `$BASE_CONTENT_DIR/gemtext/index.gmi`, and also add it to the Atom feed at `$BASE_CONTENT_DIR/gemtext/gemfeed/atom.xml`. The first level 1 Gemtext title (e.g. `# Title`) will be the displayed link name. `YYYY-MM-DD` will be the publishing date. There are various other settings, such as Author - they come from the `gemtexter.conf` configuration file.
+A subsequent `./gemtexter --generate` will then detect the new post and link it from `$BASE_CONTENT_DIR/gemtext/gemfeed/index.gmi`, link it from the main index `$BASE_CONTENT_DIR/gemtext/index.gmi`, and also add it to the Atom feed at `$BASE_CONTENT_DIR/gemtext/gemfeed/atom.xml`. The first level 1 Gemtext title (e.g. `# Title`) will be the displayed link name. `YYYY-MM-DD` will be the publishing date. Various other settings, such as Author, come from the `gemtexter.conf` configuration file.
-Once all of that is done, the `gemtexter` script will convert the new post (plus all the indices and the Atom feed) to the other formats too (e.g. HTML, Markdown).
+Once all of that is done, the `gemtexter` script will convert the new post (plus all the indices and the Atom feed) to the other formats, too (e.g. HTML, Markdown).
-You can also have a look at `$BASE_CONTENT_DIR/meta/gemfeed`. There is a meta file for each blog post stored. These meta files are required for the generation of the Atom feed. You can edit these meta files manually and run `./gemtexter --generate` or `./gemtexter --feed` again, in case you want to change some of the Atom feed content.
+You can also have a look at `$BASE_CONTENT_DIR/meta/gemfeed`. There is a metafile for each blog post stored. These metafiles are required for the generation of the Atom feed. You can edit these metafiles manually and run `./gemtexter --generate` or `./gemtexter --feed` again if you want to change some of the Atom feed content.
## Ready to be published
-After running `./gemtexter --generate` you will have all static files ready to be published. But before you do that you could preview the content with `firefox ../buetow.org-content/html/index.html` or `glow ../buetow.org-content/md/index.md` (you get the idea).
+After running `./gemtexter --generate`, you will have all static files ready to be published. But before you do that, you could preview the content with `firefox ../buetow.org-content/html/index.html` or `glow ../buetow.org-content/md/index.md` (you get the idea).
Have also a look at the generated `atom.xml` files. They make sense (at least) for Gemtext and HTML.
-Now it is up to you to setup a Gemini server for the Gemtext, a Webserver for the HTML and/or a GitHub page for the Markdown format.
+It is up to you to set up a Gemini server for the Gemtext, a Webserver for the HTML or a GitHub page for the Markdown format (or both).
diff --git a/packages/generate.source.sh b/packages/generate.source.sh
index 98cd215..6f042eb 100644
--- a/packages/generate.source.sh
+++ b/packages/generate.source.sh
@@ -139,9 +139,10 @@ generate::fromgmi () {
# Remove obsolete files from ./html/.
# Note: The _config.yml is the config file for GitHub pages (md format).
+ # Anoter note: The CNAME file is required by GitHub pages as well for custom domains.
for format in "$@"; do
find "$CONTENT_BASE_DIR/$format" -type f |
- $GREP -E -v '(\.git.*|_config.yml)$'|
+ $GREP -E -v '(\.git.*|_config.yml|CNAME)$'|
while read -r src; do
generate::fromgmi_cleanup_docs "$src" "$format"
done