Comments (17)
Then even better than Hugo
from nsm.
Hmmm, that must be caused by a bug, it should remove content/about.content
with nsm rm about
. I just tested it on my machine and it's working fine there.
What operating system are you on? How are you installing Nift? And what version do you have when you run nsm --version
?
from nsm.
I just remembered from #14 that I'm pretty sure you're on Windows and may be doing this from C:\
?
It's possible that nsm doesn't have the privileges to delete files from C:\
? I think the desktop should be at like c:\Users\(username)\Desktop
so try cd
'ing to that before cloning, cd
'ing and running nsm rm about
. Alternatively if you really want to do it from C:\
and this is the problem when you go to open command prompt you can right click and open it as administrator.
Have you installed Nift through Chocolatey?
from nsm.
Maybe I should throw an error if Nift fails to remove a file.
from nsm.
What operating system are you on?
Windows
How are you installing Nift?
curl -L -O \
https://github.com/nifty-site-manager/nsm/releases/download/v2.0.1/nsm.exe
And what version do you have when you run nsm --version?
$ nsm --version
Nift (aka nsm) v2.0.1
I think the desktop should be at like
c:\Users\(username)\Desktop
so try
cd
ing to that before cloning
$ cd 'C:\Users\Steven'
$ 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
from nsm.
Hmm, it looks like there might be a few problems with Windows. I will have a play and get back to you. Sorry about this.
from nsm.
Strange, I thought maybe the way I'm deleting files with C++ doesn't work on windows, but I just tested that with a simple C++ file and it seems to work on Windows no problem.
from nsm.
a simple C++ file
I can test that if you want
from nsm.
I have found the bug I'm pretty sure.
It seems you can't do if(std::ifstream(dir-path))
on Windows to check if a directory exists, that works on unix (at least on linux).
At least for rm
and untrack
etc. I can just check if the file I'm about to remove exists (not sure why I was even checking the directory), however there are other times it also uses that I will need to sort something out for. I noticed it's also causing a bug with clone
as well though, so might have to check a few things before putting an updated binary on github (and might even have to wait until the next version sorry, as it might be too many things to change both in the older version and the current version I'm working on).
from nsm.
From https://stackoverflow.com/questions/18100097/portable-way-to-check-if-directory-exists-windows-linux-c I might be able to use
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
int dirExists(const char *path)
{
struct stat info;
if(stat( path, &info ) != 0)
return 0;
else if(info.st_mode & S_IFDIR)
return 1;
else
return 0;
}
from nsm.
I will fix it in the current version I'm working on and then put a copy of the binary for that somewhere you can play with. The new version might not be released for a little bit because I am working on adding programming language features to the template language. I will wrap up some of the stuff I'm working on and try to get out a new release sooner than I was planning to though because these are pretty big bugs on Windows. Thanks a lot for reporting them.
from nsm.
I'm looking forward to checking build times on 10k pages etc. once I finish making these changes because I just checked and this way of checking whether a file exists is like 3 times faster!
from nsm.
Already more than 3 times faster than Hugo at full builds and up to 15 times faster from having incremental builds, check out https://hugo-vs-nift.gitlab.io/ :)
Once Nift has lots of programming language features, many of which I'm hoping will be better than any other website generators, I don't think there'll be many ways left that anything else trumps Nift. And if I can find anything I'll be working on that too :)
from nsm.
It's definitely faster, it's hard to say how much though as I've already started adding in programming language features which might have slowed it down a bit compared to the last version. Thanks to this though the version that comes out with the programming features that should slow it more than anything will be faster than the release before it! Pretty happy about that..
from nsm.
Glad to hear it, I like the fast and simple nature of this project
from nsm.
I just added nsm-fix.exe
to the most recent GitHub release. Hopefully that has all the problems fixed for you. I will try to get a few things wrapped up so I can release a new version, most importantly to chocolatey and for people installing from source on Windows. Might still take a while though as I don't want to release something with programming language features that can't really be used from a lack of other features..
from nsm.
confirmed fixed - thanks
from nsm.
Related Issues (18)
- Feature request: simulate mod_rewrite rewritten URLs HOT 7
- reStructuredText HOT 2
- MarkDown HOT 52
- Nift is not managing a project HOT 2
- Building from database content HOT 10
- Long links HOT 1
- Comment syntax HOT 7
- Pagination HOT 5
- 2 binaries of the exact same size and source - symlinking? HOT 16
- Remove .html from url HOT 4
- Error building on FreeBSD and Gentoo with the builtin LuaJIT HOT 13
- Nift sh has stopped working for me HOT 3
- Update nsm main repository readme.
- Fix small tutorial error on main website. HOT 1
- [feature request] Nift as a static/shared library HOT 8
- new-site-dir from eg. 'test/' to 'test/this/out' HOT 1
- Nift is throwing an error when cloning an empty repository HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsm.