From e68c55f27283e78029a652f29e01b51164f18401 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Fri, 2 Jun 2023 20:20:46 -0500 Subject: [PATCH] merged: with main --- README.md | 13 +++++++------ docs/source/docs/default.meta | 10 +++++----- docs/source/docs/definitions.meta | 3 +-- docs/source/docs/expansions.meta | 23 ++++++++++------------- docs/source/docs/structure.meta | 1 + 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 4614ad0..6e2e3b8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# metaforge - v0.1.2 +# metaforge - v0.1.3 a pattern driven static site generator for extensible snippet insertion. @@ -15,9 +15,10 @@ a pattern driven static site generator for extensible snippet insertion. ## about metaforge is a static site generator that lets you write something once, and re-use it -across your site. it requires previous knowledge of html, and doesn't come with pre-made -themes or templates except for a completely bare skeleton directory. it gives you extremely -fine grained control over the generated html, customizing each pattern to a source file +across your site. + +metaforge doesn't come with pre-made themes or templates except for a completely bare skeleton directory. +it gives you extremely fine grained control over the generated html, customizing each pattern to a source file with variables and mappable arrays. metaforge also lets you write metapatterns that contain classes, masking choices to a @@ -31,7 +32,7 @@ this can be set on both a site and file level, allowing single files in the site such as an rss feed. metaforge can also technically translate between any two document formats pandoc supports, but nothing other than the default markdown to html gets tested. -the full documentation is available in this repository under the **files/README/source/docs** +the full documentation is available in this repository under the **docs/source** directory. it's currently setup as a working example of a metaforge site, so you can poke around and see one way a site can be setup. @@ -41,4 +42,4 @@ and see one way a site can be setup. this command can be run as many times as needed to regenerate the documentation, and is reccomended after upgrading to a new version to see what's changed. the generated docs will -be available in **files/README/build**, and can be looked at in any web browser. +be available in **docs/build**, and can be looked at in any web browser. diff --git a/docs/source/docs/default.meta b/docs/source/docs/default.meta index 8103058..cf0bd60 100644 --- a/docs/source/docs/default.meta +++ b/docs/source/docs/default.meta @@ -2,9 +2,9 @@ ${ -{ index is a folder up in this directory } home = '../index.html' -{ using substitutions for example code so it doesn't mess up parsing } - var = '${ ' - arr = '@{ ' - pat = '&{ ' - head = '#{ ' - com = '-{ ' + var = '${' + arr = '@{' + pat = '&{' + head = '#{' + com = '-{' } diff --git a/docs/source/docs/definitions.meta b/docs/source/docs/definitions.meta index 2d790ec..7543ffa 100644 --- a/docs/source/docs/definitions.meta +++ b/docs/source/docs/definitions.meta @@ -1,7 +1,6 @@ ${ title = 'definitions' description = 'definining variables and patterns' - arr_sub = '@{' } ## rules @@ -73,7 +72,7 @@ value normally. foo.bar = [ 'foobar', 'foobaz' ] ${com} this will copy pattern/foo/*.meta twice, inserting 'foobar and 'foobaz' - once each at the location of ${arr_sub}bar} } + once each at the location of ${arr}bar} } } ${com} all of these patterns are only defined for this file } diff --git a/docs/source/docs/expansions.meta b/docs/source/docs/expansions.meta index 63b1085..2fb7ae0 100644 --- a/docs/source/docs/expansions.meta +++ b/docs/source/docs/expansions.meta @@ -1,9 +1,6 @@ ${ title = 'expansions' description = 'expanding variables and patterns in a file' - var_sub = '${' - arr_sub = '@{' - pat_sub = '&{' } ## syntax @@ -15,11 +12,11 @@ when the file is built ### examples - ...this is a string with a ${var_sub}variable} to be expanded... + ...this is a string with a ${var}variable} to be expanded... - ...this line has a ${pat_sub}pattern} inside of it... + ...this line has a ${pat}pattern} inside of it... - ...this ${arr_sub}array} will be replaced... + ...this ${arr}array} will be replaced... ## behavior @@ -41,11 +38,11 @@ don't need any extra expansion. quux = BLANK } - pattern [foo]:

${var_sub}baz} ${var}quux}

+ pattern [foo]:

${var}baz} ${var}quux}

expanded [foo]:

foo

- pattern [bar]:

${var_sub}baz} ${var}quux}

+ pattern [bar]:

${var}baz} ${var}quux}

expanded [bar]:

quux

@@ -58,7 +55,7 @@ parts of patterns. #### example - pattern [foo]:

${arr_sub}bar}

+ pattern [foo]:

${arr}bar}

defintion: ${arr} foo.bar = ['foo', 'bar', 'baz'] } @@ -94,7 +91,7 @@ allowing patterns to call the same source file every time, or source files to ex source files. ### example - ...lorem ${pat_sub}SOURCE.foo.bar} ipsum dolor... + ...lorem ${pat}SOURCE.foo.bar} ipsum dolor... once the filename is determined, it is parsed and expands any contained variables, arrays and patterns. if it is a ***SOURCE*** pattern, it is converted to html after @@ -103,14 +100,14 @@ the expansions. the expanded pattern is then inserted in place of the calling id ## building as each source file is built, the first thing expanded is the defined or default -**[SOURCE]/base/[FILE].meta** pattern, so it is required to have at least a **default.meta** +**[PATTERN]/base/[FILE].meta** pattern, so it is required to have at least a **default.meta** in the **pattern/base** directory ### example - pattern [base]: ${pat_sub}body} + pattern [base]: ${pat}body} - pattern [body]: ${pat_sub}SOURCE} + pattern [body]: ${pat}SOURCE} source [SOURCE]: foo *bar* baz diff --git a/docs/source/docs/structure.meta b/docs/source/docs/structure.meta index b8c51dc..22a5bef 100644 --- a/docs/source/docs/structure.meta +++ b/docs/source/docs/structure.meta @@ -22,6 +22,7 @@ files from the pattern directory the should generally contain html snippets, but can contain anything that you'd like to substitute. required directories are: + - source (site structure and contents) - pattern (patterns for expansion) - pattern/base (gets expanded to start building each pattern) -- 2.45.2