nifty-site-manager / nsm Goto Github PK
View Code? Open in Web Editor NEWNift - world's fastest cross-platform open source website generator.
Home Page: https://nift.dev/
License: MIT License
Nift - world's fastest cross-platform open source website generator.
Home Page: https://nift.dev/
License: MIT License
It would be great if Nift provides a way to be built as a static/shared library. I have an upcoming project in C++ which is intended to be used by non-technical people with an easy to use GUI and I am thinking of embeding a static generator into it for part of its functionality.
Is it possible at all?
To remove a tracked file run
nsm rm name
. The only difference to untrack is
that the content file will also be removed from your system.
https://nift.cc/docs/nift_commands#rm
$ nsm clone https://github.com/nsm-templates/simple-site.git
$ cd simple-site
$ ls content
about.content index.content
$ nsm rm about
successfully removed about
$ ls content
about.content index.content
Originally started here: #13 (comment)
Right now the site is outputted as
root/
-- 404.html
-- about.html
-- index.html
Can it instead output into folders like
root/
-- 404/
---- index.html
-- about/
---- index.html
-- index.html
This could be a flag in nift.config
, but I don't think including the .html
file path would be a desired output
I see that Markdown is supported:
https://www.nift.cc/docs/markdown.html
Is reStructuredText supported?
Now that NSM just did another release, it's probably a good time to update the main nsm repo readme to achieve a minimal level of documentation.
I was thinking essential build/run instructions, and then formatted links to the different areas of documentation on the main webite.
On the main documentation on https://www.nift.cc/resources/nift_tutorial.html:
Step 13 mentions first_page
being in the output directory after the last build. It actually shouldn't show up because we deleted it in step 12: nsm rm first_page
.
Solution it to just remove it from the description of files in the output directory.
Thank you for your work on this! This is a, uh, nifty and elegant project and I'm interested in migrating an existing site to it, but I'm running into one barrier: preserving the URL structure of the site. As far as I can tell, it's not possible to change the output path of a particular file. For instance, if my content was like this:
I'd want it to output to a structure like this:
Is this feasible? Or is the only way to do this to actual have a bunch of subfolders in my content, each with a single index.content file?
As usual, I tried to update the Gentoo ebuild and the FreeBSD ports, but I get the following error:
FreeBSD:
make
===> License MIT accepted by the user
===> nift-2.3.12 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by nift-2.3.12 for building
===> Extracting for nift-2.3.12
=> SHA256 Checksum OK for nifty-site-manager-nsm-v2.3.12_GH0.tar.gz.
===> Patching for nift-2.3.12
/usr/bin/sed -i.bak -e 's|%%LOCALBASE%%|/usr/local|g' /usr/home/mamadou/nift/work/nsm-2.3.12/Makefile
===> nift-2.3.12 depends on package: gmake>=4.3 - found
===> nift-2.3.12 depends on file: /usr/local/bin/ccache - found
===> Configuring for nift-2.3.12
===> Building for nift-2.3.12
gmake[2]: Entering directory '/usr/home/mamadou/nift/work/nsm-2.3.12'
cd LuaJIT && gmake
gmake[3]: Entering directory '/usr/home/mamadou/nift/work/nsm-2.3.12/LuaJIT'
==== Building LuaJIT 2.1.0-beta3 ====
gmake -C src
gmake[4]: Entering directory '/usr/home/mamadou/nift/work/nsm-2.3.12/LuaJIT/src'
HOSTCC host/minilua.o
HOSTLINK host/minilua
clang: error: no such file or directory: './LuaJIT/src/libluajit.a'
gmake[4]: *** [Makefile:642: host/minilua] Error 1
gmake[4]: Leaving directory '/usr/home/mamadou/nift/work/nsm-2.3.12/LuaJIT/src'
gmake[3]: *** [Makefile:113: default] Error 2
gmake[3]: Leaving directory '/usr/home/mamadou/nift/work/nsm-2.3.12/LuaJIT'
gmake[2]: *** [Makefile:211: make-lua] Error 2
gmake[2]: Leaving directory '/usr/home/mamadou/nift/work/nsm-2.3.12'
*** Error code 1
Stop.
make[1]: stopped in /usr/home/mamadou/nift
*** Error code 1
Stop.
make: stopped in /usr/home/mamadou/nift
Gentoo:
* Package: www-apps/nift-2.3.12
* Repository: NuLL3rr0r
* Maintainer: [email protected]
* Upstream: https://github.com/nifty-site-manager/nsm/issues
* USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
* FEATURES: ccache network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking nift-2.3.12.tar.gz to /var/tmp/portage/www-apps/nift-2.3.12/work
>>> Source unpacked in /var/tmp/portage/www-apps/nift-2.3.12/work
>>> Preparing source in /var/tmp/portage/www-apps/nift-2.3.12/work/nsm-2.3.12 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/www-apps/nift-2.3.12/work/nsm-2.3.12 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/www-apps/nift-2.3.12/work/nsm-2.3.12 ...
make -j9 -l8 all
cd LuaJIT && make
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o ConsoleColor.o ConsoleColor.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Directory.o Directory.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Filename.o Filename.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o SystemInfo.o SystemInfo.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o DateTimeInfo.o DateTimeInfo.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Expr.o Expr.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Quoted.o Quoted.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o NumFns.o NumFns.cpp
make[1]: Entering directory '/var/tmp/portage/www-apps/nift-2.3.12/work/nsm-2.3.12/LuaJIT'
==== Building LuaJIT 2.1.0-beta3 ====
make -C src
make[2]: Entering directory '/var/tmp/portage/www-apps/nift-2.3.12/work/nsm-2.3.12/LuaJIT/src'
HOSTCC host/minilua.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o StrFns.o StrFns.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o HashTk.o hashtk/HashTk.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Title.o Title.cpp
HOSTCC host/buildvm_asm.o
HOSTCC host/buildvm_peobj.o
HOSTCC host/buildvm_lib.o
HOSTCC host/buildvm_fold.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Path.o Path.cpp
CC lj_gc.o
CC lj_char.o
CC lj_obj.o
CC lj_buf.o
CC lj_str.o
CC lj_tab.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Lua.o Lua.cpp
CC lj_func.o
CC lj_udata.o
CC lj_meta.o
CC lj_debug.o
CC lj_state.o
CC lj_vmevent.o
CC lj_vmmath.o
CC lj_strscan.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o FileSystem.o FileSystem.cpp
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Variables.o Variables.cpp
CC lj_strfmt.o
CC lj_strfmt_num.o
CC lj_api.o
CC lj_profile.o
CC lj_lex.o
CC lj_parse.o
CC lj_bcread.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Pagination.o Pagination.cpp
CC lj_bcwrite.o
CC lj_load.o
CC lj_ir.o
CC lj_opt_mem.o
CC lj_opt_narrow.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o TrackedInfo.o TrackedInfo.cpp
CC lj_opt_dce.o
CC lj_opt_loop.o
CC lj_opt_split.o
CC lj_opt_sink.o
CC lj_mcode.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o GitInfo.o GitInfo.cpp
CC lj_snap.o
CC lj_asm.o
CC lj_trace.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Lolcat.o Lolcat.cpp
CC lj_gdbjit.o
CC lj_ctype.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o WatchList.o WatchList.cpp
CC lj_cdata.o
CC lj_cconv.o
CC lj_ccall.o
CC lj_ccallback.o
CC lj_carith.o
CC lj_clib.o
CC lj_cparse.o
CC lj_lib.o
CC lj_alloc.o
c++ -march=native -O2 -pipe -std=c++11 -Wall -Wextra -pedantic -O3 -Dexprtk_disable_caseinsensitivity -s -D__BUNDLED__ -D__LUAJIT_VERSION_2_1__ -c -o Getline.o Getline.cpp
CC lib_aux.o
CC lib_package.o
CC lib_init.o
CC luajit.o
HOSTLINK host/minilua
�[01m�[Kgcc:�[m�[K �[01;31m�[Kerror: �[m�[K./LuaJIT/src/libluajit.a: No such file or directory
make[2]: *** [Makefile:642: host/minilua] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/www-apps/nift-2.3.12/work/nsm-2.3.12/LuaJIT/src'
make[1]: *** [Makefile:113: default] Error 2
make[1]: Leaving directory '/var/tmp/portage/www-apps/nift-2.3.12/work/nsm-2.3.12/LuaJIT'
make: *** [Makefile:211: make-lua] Error 2
make: *** Waiting for unfinished jobs....
* ERROR: www-apps/nift-2.3.12::NuLL3rr0r failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=www-apps/nift-2.3.12::NuLL3rr0r'`,
* the complete build log and the output of `emerge -pqv '=www-apps/nift-2.3.12::NuLL3rr0r'`.
* The complete build log is located at '/var/tmp/portage/www-apps/nift-2.3.12/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/www-apps/nift-2.3.12/temp/environment'.
* Working directory: '/var/tmp/portage/www-apps/nift-2.3.12/work/nsm-2.3.12'
* S: '/var/tmp/portage/www-apps/nift-2.3.12/work/nsm-2.3.12'
I guess somehow Make tries to build in parallel (while still, that file does not exist).
Hi,
I am following the tutorial here https://nift.dev/resources/tutorials/get_started.html for gradient-blog template https://gitlab.com/nsm-blogs/gradient-blog
When I try to rebuild the project I got an error:
❯ nsm build-all
loading project config file: ".nsm/nift.config"
loading project tracking file: ".nsm/tracking.list"
building project..
error: "content/blog/post01.content"[9]: $``: exprtk: failed to compile expression
error: "content/blog/post01.content"[9]: exprtk: Syntax Error: ERR190 - Invalid use of reserved symbol 'and'
error: "template/page.template"[10]: input("content/blog/post01.content") failed
error: "template/page.template"[10]: failed to insert content
6 files built successfully
=> failed to build:
blog/post01
time taken: 0.225 seconds
error: nsm.cpp: clone: system('git checkout stage > /dev/null 2>&1 >nul 2>&1') failed in '/home/nick/Music/presentation-temps/impress-template'
The size of nsm equals the size of nift.
They are built from the same input files.
Was your intention to provide one of them and have the other as a symlink?
If so, do you want the base name as nsm or rather nift?
We can save size with this, unless it matters that they are two names.
Starting here:
https://nifty-site-manager.com/resources/get_started
I do:
$ nsm clone https://github.com/nifty-site-manager/simple-site.git
$ nsm build-updated
Nift is not managing a project from C:\ (or any accessible parent directories)
$ cd simple-site
$ nsm build-updated
Nift is not managing a project from C:\simple-site (or any accessible parent
directories)
it seems the instructions are missing something
So I see that MarkDown is possible:
https://nifty-site-manager.com/docs/markdown
but its not clear how to actually make it work. I see this:
@system{inject}("pandoc file-path")
but it doesnt say where you would put that code. I also see this:
https://github.com/nifty-site-manager/simple-site
but Im not sure what to make of it. Im guessing a layout like this would be
needed?
content/
sunday.content
sunday.md
then put the inject inside the content file? That just seems strange because
then you need 2 files for every post. I think I am not understanding it.
I found nsm yesterday and it looks really cool, very excited about nsm build-updated
. I tried some of the examples, and am now interested in testing it out with more pages/data.
I saw in the docs you talk about inputting data from scripts as content and later on give some suggestions on how to call the data. To actually get this setup I think I need a some guidance on nsm. Would you be able to include a new nsm-template that gets its data from a test api that generates a new page for each post, where the content is parsed (<h1>{{ title }}</h1>
and <p>{{ body }}</p>
). I believe this sample would be very useful for others trying to get started with nsm aswell.
Thanks, and let me know what I can do to help, maybe I just need pointed in the right way.
I use Nift to make the text in my terminal rainbox. Used to work without issue. But now when I do nift sh it says "cannot change profile for the next exec call: No such file or directory". Can you please advise? Super cool project btw.
Neither the page files nor the info files are copied properly for new-site-dir from eg. 'test/' to 'test/this/out'.
Sometimes I have long links, like this:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf
Ideally I would like to split the link in the markup like this:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/
Global_Objects/String/lastIndexOf
originally reported here: #13 (comment)
This is supported by other projects:
https://gohugo.io/templates/pagination
and it appears to not be supported currently:
I haven't worked out a good way to do pagination yet
One thing I haven't worked out yet is a good way for people to do pagination
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.