v0.3.0 - Block Maker #112
Replies: 2 comments 8 replies
-
very happy for the release and for @HugoGranstrom joining the team! so, what's next? plan is:
after these I would like to:
then the idea would be to enjoying the 0.3 and trying to add and improve stuff before breaking again and focusing more on creating blog posts and creating themes. Most of the priorities there will be set when updating the roadmap. At some point it would be time to break again and the target is #111. Ah, the idea is also to use a little bit more this discussion forum, so let's hear it from all of you! |
Beta Was this translation helpful? Give feedback.
-
@pietroppeter You planned to do a NImConf talk about nimib if I recall correctly? Do you have a rough idea of what you want to cover? I'm tempted to do one on |
Beta Was this translation helpful? Give feedback.
-
Release notes (from changelog)
This release started with the aim of making the construction of custom blocks as easy as the construction of native blocks.
A wide refactoring of the codebase was required for this (#78)
and further adjustments were made along the way (#80, #81).
Some new blocks are introduced taking advantage of this (e.g.
nbRawOutput
,nbPython
) (#80, #83).Contributing to the codebase is made easier through introduction of proper testing (#80)
docs are now built in CI (#89, #90, #91) and deploy previews have been added (#92, #93).
Documentation has been updated to include all changes so far
and contextually the changelog has been updated (#103).
A big milestone is reached (#88) by introducing templates to add interactivity to documents
taking advantage of nim js backend (
nbCodeToJs
allows to incorporate javascript scripts in the document derived from nim code).In particular templates to reduce boilerplate when developing karax based apps or
widgets are introduced (
nbKaraxCode
,karaxHtml
).Three new example documents are introduced for documenting this change (
interactivity
,counters
,caesar
).Another major change is setting as default the
CodeAsInSource
introduced in 0.2.4(a number of fixes are made: #105, #106, #108).
Most of these contributions are due to @HugoGranstrom
(thanks for all the awesome work on this ❤️) which joins @pietroppeter
as maintainer and co-creator of nimib! 🥳
List of detailed changes:
NbBlock
type and rendering of blocks (Refactor nb blocks (fix #24) #78, fixes refactor rendering #24):NbBlock
type is completely refactored. Instead of having akind
with a fixednumber of values, a block behaviour is specified by a
command
stringwhich is set to the name of the command template used to create a block
(e.g.
nbCode
,nbText
,nbImage
, ...) -newNbBlock
is now the main template to create a new blockcontext
field and the rendering backend (either html or markdown)has a mechanism to retrieve a
partial
for every command.a sequence of
renderProc
s can be assigned for every command (for a specific backend).nimib / renders
module completely refactored to take into account the above changessugar
is now exported (accidental)nb: NbDoc
is mutated when rendered (unwelcome, will be changed later)nimib.blocks.newNbBlock
) (Refactor nb blocks (fix #24) #78)main
partial introduced (Refactor nb blocks (fix #24) #78)nbDoc
,nbBlock
,nbHomeDir
) are noew removed (Refactor nb blocks (fix #24) #78)readCode: bool
parameter tonewNbBlock
(with an overload that sets it as true) (A bit of everything related to v0.3 #80)nbRawOutput
that renders raw html (A bit of everything related to v0.3 #80)nbClearOutput
that removes output from last block processed (A bit of everything related to v0.3 #80)newNbCodeBlock
andnewNbSlimBlock
for creating custom blocks and related changes (Release 0.3 #81):
newNbCodeBlock
: captures source code ofbody
newNbSlimBlock
: block without abody
(and in particular no capture of source)nbText
does NOT contain its sourcenbTextWithCode
that does contain code sourcefiles.nim
, changed the rendering ofnbFile
(no more "writing file ..." only the name of file is added) (Release 0.3 #81)
loadNimibCfg
proc that can be used for themes (used by nimibook) (Release 0.3 #81)nbInitPython
andnbPython
templates to support running python in nimib documents usingnimpy
(nbPython #83)md
andfmd
fromnimib / boost
now deprecated and replaced byhlMd
andhlMdF
hlPy
andhlPyF
innimib / boost
docsrc
docs
nbCodeToJs
: a block of nim code is compiled to javascript and added as a script to html file (and allows capturing of variables)nbCodeToJsInit
,addCodeToJs
,addToDocAsJs
: templates to allow splitting in multiple blocks the code innbCodeToJs
nbCodeToJsShowSource
: template to show the nim source of anbCodeToJs
block.nbKaraxCode
(withkaraxHtml
): template to create a karax app/widget with minimal boilerplate (based onnbCodeToJs
)interactivity.nim
: explains the basic ofnbCodeToJs
and related templatescounters.nim
: shows how to create counter widgets usingnbCodeToJs
caesar.nim
: a caesar cipher app built usingnbKaraxCode
nimib / jsutils
to support the implementation of the abovenewId
proc forNbDoc
that gives a new incremental integer every time it is called (Compiling nim to javascript #88)CodeAsInSource
is made default:nimibCodeFromAst
flag to revert to old defaultnimibPreviewCodeAsInSource
(now obsolete)CodeAsInSource
(Fix codeAsInSource #105, fix codeblocks starting with a block #106, fix newline at beginning of code block #108)nimib.nim
(improving docs for v0.3 + fix markdown backend #103)nbInitMd
to use markdown backendthemes.noTheme
for empty theme (used bynbInitMd
)Thanks to @metagn for improving our CI/nimble file! Every contribution counts!
Relevant examples of usage:
slides using reveal.js html presentation framework
Following are the automatic release notes by Github
What's Changed
New Contributors
Full Changelog: v0.2.4...v0.3.0
This discussion was created from the release v0.3.0 - Block Maker.
Beta Was this translation helpful? Give feedback.
All reactions