Commit Graph

579 Commits

Author SHA1 Message Date
04edfff25e _msg: Debug 2024-02-14 12:55:01 +01:00
08935e109a qsgen2: Set globaldebug and exit 2024-02-14 12:46:51 +01:00
38b9863a64 nb_NO: Split text string 2024-02-14 12:43:09 +01:00
19748fce8e _msg: Refactor 2024-02-14 12:40:53 +01:00
0a8cd680bd qsgen2: Update stuff 2024-02-14 12:17:35 +01:00
099897ac34 qsgen2: Update strings in Spanish language file 2024-02-14 12:06:47 +01:00
a3e7eee83d qsgen2: Update strings in language files 2024-02-14 11:58:21 +01:00
e2c7f85125 qsgen2: Add correct path to language files 2024-02-14 11:38:42 +01:00
61cd217861 qsgen2: Load language after reading config file 2024-02-14 11:37:25 +01:00
c68dafda4f qsgen2: Updated function _msg to enable localization. en_US, es_ES and nb_NO available. 2024-02-14 11:35:47 +01:00
136a9644f5 qsgen2: Simplify local vs global debug 2024-02-13 07:12:10 +01:00
987a80397d Disable debug 2024-02-12 23:12:42 +01:00
f4e8dee83c Update to version 0.3.6 2024-02-12 23:12:06 +01:00
0ff85c7128 Refactor _f_last_updated 2024-02-12 23:09:17 +01:00
48b2f30ea7 Refactor _f_last_updated 2024-02-12 23:03:26 +01:00
a34812d11c Replace #updated with the updated message in qsgen2 file 2024-02-12 23:01:36 +01:00
8a9f4eed88 Fix debug flag in _blog_index function
Changed the debug flag in the _blog_index function from true to false to disable debugging for the function. Also, modified the file write operation to directly write the blog_index_content to /blog/index.html instead of using a temporary file
2024-02-12 22:47:27 +01:00
80e1874926 Refactor _f_last_updated 2024-02-12 22:44:57 +01:00
0dfa793dae Really try to write to file 2024-02-12 22:39:00 +01:00
9ab53d6bfb Really try to write to file 2024-02-12 22:37:23 +01:00
89d2415e47 Really try to write to file 2024-02-12 22:35:24 +01:00
8270bf4f31 Really try to write to file 2024-02-12 22:32:46 +01:00
c96c113678 Fix tee command 2024-02-12 22:26:31 +01:00
4c57f98146 Refactor _blog_index function in qsgen2 script
This commit refactors the _blog_index function in the qsgen2 script. The changes include:

- Commenting out the debug messages for the content of blog_index_content.
- Using the `tee` command with the `-overwrite` option to write the blog_index_content to ${www_root}/blog/index.html.
- Redirecting the output of `tee` to /dev/null to suppress any output.
2024-02-12 22:24:13 +01:00
d8801d3b3f Add debug messages to _blog_index function in qsgen2 script 2024-02-12 22:19:50 +01:00
953986f0af Add error handling for writing to /blog/index.html in _blog_index function 2024-02-12 21:57:38 +01:00
0af7129cd5 Refactor _blog_index function in qsgen2 script
- Change the debug message to use  instead of
- Update the echo command to use double quotes around

These changes improve the readability and consistency of the code.
2024-02-12 21:53:26 +01:00
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