Commit Graph

552 Commits

Author SHA1 Message Date
7ce545e423 Add blog index content to /blog/index.html
This commit adds the blog index content to the file /blog/index.html. The function  replaces the  placeholder in the content with the actual blog index list. After the replacement, the updated content is written to the file /blog/index.html. The commit also includes debug messages to display the content of  before writing it to the file.
2024-02-12 21:04:16 +01:00
cce973f2cd Fix debug flag in _blogs function and add debug messages in _blog_index function
In the _blogs function, the debug flag was set to true, which caused unnecessary debug output. Changed it to false.

In the _blog_index function, added debug messages to indicate the replacement of sitename and tagline, as well as the replacement of BODY with the content of the blog index file.

This commit fixes the debug flag and adds debug messages for better troubleshooting and understanding of the code.
2024-02-12 21:01:15 +01:00
caeb4af27a Refactor _blogs and _blog_index functions
This commit refactors the _blogs and _blog_index functions in the qsgen2 script.

In the _blogs function, the directory creation message is updated to use the correct variable  instead of . Additionally, a debug message is added to indicate when  is set to true.

In the _blog_index function, debug messages are added to display the values of  and . The debug message for generating the page is updated to include the correct file path .

These changes improve the clarity and accuracy of the script's functionality.
2024-02-12 20:40:53 +01:00
732b5052b4 Update debug variable in qsgen2 script
The debug variable in the qsgen2 script was updated from true to false in the _pages() function and from false to true in the _blog_index() function.
2024-02-12 20:33:51 +01:00
67136642e5 Refactor _pages function in qsgen2 script to use a while loop to find the page_title. This change allows the function to work with both native and markdown generators. 2024-02-12 20:29:04 +01:00
bdc218a0a0 Refactor page generation in qsgen2
This commit refactors the  function in  script. It updates the order of operations and improves code readability.

The changes include:
- Replacing  with  in  after replacing other placeholders.
- Updating debug messages for better logging.

Additionally, the commit generates the blog index file and updates the message accordingly.

These changes improve the page generation process and ensure that the blog index file is correctly generated.
2024-02-12 18:42:29 +01:00
e5cb3cc087 Update debug variable in _pages function 2024-02-12 18:25:03 +01:00
4e3d7ba1e9 Enable debug mode in _blogs function and remove commented out lines and unused variable 2024-02-12 18:22:48 +01:00
166157fc77 Spaces and tabs 2024-02-11 11:11:24 +01:00
5d399d716f Move language files to its own directory. Support coming later. 2024-02-11 11:04:04 +01:00
73dfd0446d Refactor _blogs function in qsgen2 file to extract blog title based on generator type (native/markdown) 2024-02-10 22:20:39 +01:00
f7e542c749 Fix syntax error in qsgen2 script 2024-02-10 22:14:28 +01:00
90f779d89f Fix syntax error in qsgen2 script 2024-02-10 22:13:14 +01:00
30c99c11b9 Refactor code in qsgen2 script
This commit refactors the code in the qsgen2 script. It fixes the assignment of the  variable by using the correct syntax for capturing the match in the regular expression. It also fixes the assignment of the  variable in the  function. These changes ensure that the script works correctly with both the native and markdown generators.
2024-02-10 22:09:19 +01:00
b615627436 Fix variable assignment in qsgen2 script 2024-02-10 22:06:12 +01:00
b6ae91dbf9 Add checks for DATE and BLOG_TITLE metadata in the _blogs function. If either metadata is missing in a blog file, a debug message is logged and the file is skipped. 2024-02-10 22:03:37 +01:00
06a5aba5aa Minor change 2024-02-10 21:57:16 +01:00
a707f1e009 Minor change 2024-02-10 21:56:48 +01:00
162f217f94 Minor change 2024-02-10 21:53:36 +01:00
638f073f17 Minor change 2024-02-10 21:52:59 +01:00
13e9c8d172 Refactor qsgen2 script to separate the pandoc engine and its options into separate variables. This allows for easier modification and customization of the pandoc command. The changes include:
- Assigning the pandoc engine path to the  variable.
- Assigning the pandoc engine options to the  variable.
- Modifying the usage of the  variable in the  and  functions to include the .

These changes improve the flexibility and maintainability of the script by separating the engine and its options, making it easier to modify and customize the pandoc command.
2024-02-10 21:49:34 +01:00
12f36071df Update Quick Site Generator 2 README and qsgen2 script
- Update to version 0.3.5
- Updated the link to Zsh in the README file.
- Made changes to the _pages function in the qsgen2 script to use Zsh built-in functions for finding the page title.
- Added support for finding the page title in markdown files in the _pages function.
- Added support for finding the blog title in markdown files in the _blogs function.
2024-02-10 21:15:24 +01:00
9eafc715b6 Update README.md 2024-02-09 12:58:02 +01:00
4afa2c2d5a Update qsgen2 to version 0.3.4
• Updated the VERSION variable from 0.3.3 to 0.3.4
 • Added a check for the DATE metadata in the blog file
 • If the DATE metadata is missing, the script will skip the file and move to the next

These changes ensure that the script properly handles the DATE metadata in the blog files and prevents any issues caused by
missing metadata.
2024-02-08 07:57:14 +01:00
75b98cc2e3 Remove 3rdpart directory 2024-02-08 07:33:51 +01:00
1fb7f3acb0 Add support for additional plugin directories in qsgen2
This commit modifies the qsgen2 script to add support for additional plugin directories. The fpath variable is updated to
include /home/stig/.config/qsgen2/plugins in addition to /home/stig/bin/include/common. This allows users to place their custom
plugins in the ~/.config/qsgen2/plugins directory and have them loaded by the script.

Additionally, a debug message is added to notify the user if no valid generator is found in the 'config' file, and the
script exits in that case.

The commit also includes some minor code formatting and comment updates for clarity.
2024-02-08 07:31:30 +01:00
d3a7e6d3d9 _blog_index: Fix a bug where #sitename wasn't being updated 2024-02-06 10:14:19 +01:00
4840374414 Add external link svg icon 2024-02-06 10:08:48 +01:00
3ddf20b333 _msg: Change colors 2024-02-06 09:56:12 +01:00
f8242328ad _msg: Change the display of colors 2024-02-06 09:55:22 +01:00
95df8e4c75 _msg: Add forgotten close for case 2024-02-06 09:54:10 +01:00
7789b060df qsgen2: Lots of fixes and better messages 2024-02-06 09:53:22 +01:00
4f49610eab _link: Remove space for external icon 2024-02-06 07:35:53 +01:00
949f36cb91 _link: Update external icon 2024-02-06 07:30:40 +01:00
2850f4567e qsgen2: Squash some unwanted debug messages 2024-02-05 21:43:34 +01:00
8da466d720 qsgen2: Load zsh/datetime to use strftime using zmodload 2024-02-05 21:39:34 +01:00
2e8e60d8a3 qsgen2: Load zsh/datetime to use strftime 2024-02-05 21:34:22 +01:00
cfc5e02117 qsgen2: Version 0.3.3 2024-02-05 21:21:47 +01:00
28d26040a4 qsgen2: More cleaning up tabs and spaces 2024-02-05 21:19:22 +01:00
535a5ec0b8 qsgen2: Clean up tabs and spaces 2024-02-05 20:55:22 +01:00
45d1d31356 qsgen2: Use strftime instead of date 2024-02-05 20:10:28 +01:00
3aaa193dc3 qsgen2: Add globaldebug and use it across the script 2024-02-05 19:50:17 +01:00
13ede0db53 _zhtml: Add formatting to the li tag 2024-02-05 19:18:57 +01:00
7a754b46d6 _blog_idx_for_index: Run engine on content to catch QStags in Ingress 2024-02-05 18:43:49 +01:00
bd6da5ea27 qsgen2: Version 0.3.1 2024-02-05 16:22:39 +01:00
66504b7c58 qsgen2: Disable debug 2024-02-05 16:20:39 +01:00
410eff03e5 _cd_to_site: Remove function as 'cd' doesn't work in scripts 2024-02-05 16:03:31 +01:00
48e31089c1 _cd_to_site: Try to change dir another way 2024-02-05 15:59:45 +01:00
818b260532 _cd_to_site: Try to change dir another way 2024-02-05 15:58:59 +01:00
e427b0e4ce _cd_to_site: Try to change dir another way 2024-02-05 15:58:05 +01:00