tj / staticgen Goto Github PK
View Code? Open in Web Editor NEWStatic website generator that lets you use HTTP servers and frameworks you already know
License: MIT License
Static website generator that lets you use HTTP servers and frameworks you already know
License: MIT License
HTTP caching features could be used to test the freshness, instead of blowing away the entire build each time.
It's not bad as-is, but I haven't put any effort into this yet.
I'm on ChromeOS, I follow the install instructions:
$ curl -sf https://gobinaries.com/tj/staticgen/cmd/staticgen | sh
\x1b[38;5;61m ==>\x1b[0;00m Downloading github.com/tj/staticgen/cmd/staticgen@master
\x1b[38;5;61m ==>\x1b[0;00m Resolved version master to v1.0.1
\x1b[38;5;61m ==>\x1b[0;00m Downloading binary for linux amd64
\x1b[38;5;61m ==>\x1b[0;00m Installing staticgen to /usr/local/bin
install: cannot change permissions of ‘/usr/local/bin’: Operation not permitted
Alternatively, could there be a way to execute staticgen
without installing it? the curl | sh
command could execute the binary instead of installing it.
Would be nice :D
When attempting to use staticgen against a live site, it runs for some time and then I get this:
ERROR[0008] error saving error=context canceled url=https://mydomain/somepath/file.pdf
ERROR[0008] error saving error=context canceled url=https://mydomain/somepath/other-file.pdf
FATAL[0008] error: crawling: &{%!w(string=stopping: &{%!w(string=getting process group id: %!w(syscall.Errno=3))})}
INFO[0008] Stopping server, sending SIGTERM
Note the domain is obfuscated here and below. I'll DM the real domain in slack.
Use this static.json
{
"command": "true",
"url": "https://mydomain/"
}
Then run staticgen
Crawler stops on 404 or 405
Kind of unnecessary overkill really, I'd kind of rather throw this stuff in a Makefile, not sure why I went with a config file.
Right now they're not very real-world-ish
Would be nice to mention if crawler is executing js when visiting pages. A section in readme titled Javascript execution
or similar would be good enough.
Join us on Slack https://chat.apex.sh/
Easier to install
I use imgix for all of my images, so it'd be nice to just replace those when compiling for production
This may be a dumb question, but is it possible to use staticgen to build sites within CI (continuous integration) tools, such as Netlify builds and/or Github Actions? It's non-obvious to me since it requires the site be to be accessible via a URL.
I had a few which were broken, might be nice as a separate tool though
Add option to minify CSS output, right now you have to do this yourself after performing the build.
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.