Skip to content

Commit

Permalink
Upgraded documentation to Bootstrap 5; Added wiki pages
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-manias authored Feb 14, 2025
1 parent 7563dcf commit 1e451a0
Show file tree
Hide file tree
Showing 253 changed files with 41,506 additions and 14,745 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/wiki"]
path = docs/wiki
url = https://github.com/parasol-framework/parasol.wiki.git
184 changes: 0 additions & 184 deletions docs/book.xml

This file was deleted.

64 changes: 64 additions & 0 deletions docs/generate-wiki.fluid
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
-- This script will generate HTML documentation by running pandoc against every markdown document file found in the
-- wiki folder. It will fail if pandoc is not installed on the system.
--
-- Support parameters:
--
-- src: Source folder for markdown documents

require 'filesearch'

glSelf = obj.find('self')

local pandoc = 'c:Program Files/Pandoc/pandoc'
local md_folder = arg('src', glSelf.workingPath .. 'wiki/')

local header = file.readAll(glSelf.workingPath .. 'wiki-header.html')
local footer = file.readAll(glSelf.workingPath .. 'wiki-footer.html')

local err, temp_output = mSys.ResolvePath('temp:markdown.html', RSF_NO_FILE_CHECK)

file.search(md_folder, {
nameFilter = '^.*%.md$',
nameWild = true,
matchFeedback = function(Path, FileName, File)
local title = FileName:gsub('-', ' ')
title = title:gsub('.md', '')

local src_path = Path .. FileName
local output_path = src_path:gsub('[/\\]wiki[/\\]', '/html/wiki/')
output_path = output_path:gsub('%.md', '.html')

err, res_src_path = mSys.ResolvePath(src_path)
assert(err == ERR_Okay, 'Failed to resolve path ' .. src_path)

err, res_output_path = mSys.ResolvePath(output_path, RSF_NO_FILE_CHECK)
assert(err == ERR_Okay, 'Failed to resolve path ' .. output_path)

err, res_header_path = mSys.ResolvePath(glSelf.workingPath .. 'wiki-header.inc', RSF_NO_FILE_CHECK)
assert(err == ERR_Okay, 'Failed to resolve path to wiki-header.inc')

local parameters = res_src_path .. ' -o ' .. temp_output .. ' -f gfm -t html5 -c github-markdown.css --wrap=preserve --embed-resource'
print('Running ' .. pandoc .. ' ' .. parameters)

local task = obj.new('task', {
src = pandoc,
args = parameters,
flags = 'WAIT',
outputCallback = function(Task, Data)
-- Dummy function; Pandoc needs stdout to be processed in Windows or it doesn't work
end,
timeout = 5
})
task.acActivate()

local md_output = file.readAll(temp_output)
local fl = obj.new('file', { path=res_output_path, flags='WRITE|NEW' })

mod_header = header:gsub('<title>Parasol Wiki</title>', '<title>Parasol Wiki - ' .. title .. '</title>')

fl.acWrite(mod_header)
fl.acWrite('\n<h1>' .. title .. '</h1>\n')
fl.acWrite(md_output)
fl.acWrite(footer)
end
})
2 changes: 1 addition & 1 deletion docs/generate.fluid
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ end
err, res_class_folder = mSys.ResolvePath(class_folder)
assert(err == ERR_Okay, 'Failed to resolve XML folder ' .. class_folder)

local parameters = res_src_path .. ' -o ' .. res_output_path .. ' --path "' .. res_module_folder .. ' ' .. res_class_folder .. '"'
local parameters = res_src_path .. ' --encoding UTF-8 -o ' .. res_output_path .. ' --path "' .. res_module_folder .. ' ' .. res_class_folder .. '"'
print('Running xsltproc ' .. parameters)

local task = obj.new('task', {
Expand Down
5 changes: 5 additions & 0 deletions docs/html/css/bootstrap-icons.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 1e451a0

Please sign in to comment.