在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):marcoarment/secondcrack开源软件地址(OpenSource Url):https://github.com/marcoarment/secondcrack开源编程语言(OpenSource Language):PHP 99.1%开源软件介绍(OpenSource Introduction):Second Crack is a basic static-file blog engine using Markdown-formatted text files as input. WarningSecond Crack should be considered an early alpha. Even though I've run Marco.org with it for a long time, it's still rough and unfriendly. There are also still significant known bugs that I haven't had time to fix yet. (Feel free!) Among them:
These can usually be fixed temporarily by clearing the Other minor bugs:
InstallationSecond Crack requires PHP 5.3+ and has only been tested so far on Mac OS X and CentOS 5.5, with Apache httpd. It's already fast with Apache, but it can be even faster and capable of even more burst traffic if you put a caching proxy such as Varnish in front of it. Check this directory out on the server (or locally on Mac or Linux for testing, if you'd like). Add a line like this to your
The updater script will append its output to I strongly suggest installing inotify-tools to get Your webserver should use BasicsEach
The engine expects a folder structure like this: (this is your
If you're going to use Dropbox to publish, put that top-level blog-source folder somewhere in your Dropbox folder. Set up config.phpCopy The blog-source folder ( PostingMake a file in
(Don't set a When the updater runs next, the engine will create a sister file in a
Whenever you want to preview your post, just save the To publish a post, either move it into the
Once that file is saved and the updater runs, it will publish the post immediately, removing it from To edit a post, simply edit its file in Posting with bookmarkletsSecond Crack comes with a pair of convenience bookmarklets, "Draft Link" and "Draft Article", that create draft posts from the current page and any selected text. To enable this, create a second web root on an alternate domain, e.g.
...and install the bookmarklets from there. Your username and password to use these are set in Dropbox sync (strongly recommended)Here's a video demo of why you really want Dropbox sync and those bookmarklets. Second Crack's updater examines the blog source directory for changes, then writes HTML files into the web directory as needed. If you're writing on a computer, you probably have a server hosting the blog somewhere, and need some way to update the content on the server. The best way to do this, and the setup that Second Crack is designed to operate in, is to set up Dropbox in both places: the native client for your computer, and the Linux CLI client on the server. NOTE: If you don't want your server to have access to your entire Dropbox folder, you can do a dual-account trick: create a second Dropbox account, set up that one on the server, and "share" the blog-source folder from your primary account to the second account on Dropbox. With Dropbox set up, the publishing and previewing workflow is streamlined, and you never need to run the Second Crack updater manually:
Even when you publish, just write the "publish-now" header, hit Save, and close the file. Within seconds, it will disappear from the It's pretty awesome. And if you want to edit your blog on the iPhone or iPad, you can do it with any Dropbox-capable text editor. FAQDon't a lot of these static-file blogging engines already exist?Yes. Have you tried [existing solution]?No. Isn't this reinventing the wheel?Yes. Don't you have other things you could be working on?Yes. (Don't we all?) This name isn't unique.You're probably right. Neither the domain nor the Twitter username are available, and it's probably trademarked in an industry I've never heard of. Really, it's a terrible idea to launch a major project with such an unavailable name. But this isn't a major project, and I don't intend for it to get widespread enough that those problems will ever matter. I needed a name. This came to mind. It's a coffee-roasting term for the moment in the roast that the bean audibly pops for the second time, indicating development of the strongest flavors and the point that you should stop the roast because it's done. You're not entirely correct on that definition. And I prefer my roast to be [x] seconds (before|after) second crack.I know. For the purposes of this FAQ, it's not really relevant. OK, back to the static-file blog engine. What have you done differently from [existing solution]?A bunch of small things, probably. I don't know enough about the other solutions to really say. Why doesn't it have [feature]?Because I didn't think [feature] needed to be there. Some anticipated frequent values for [feature]: Comments: Use Disqus or Facebook comments. Or just go without comments. Do you really need them? Why should I use this instead of [existing solution]?I don't know. You probably shouldn't. Will this make you, me, or anyone any money?I doubt it. So why did you make this?Because I'm a programmer, and this is what I do. Some people jog away from their house every day, only to jog back. Others walk on a treadmill, expending energy to get nowhere. In both cases, it may appear to others that they've accomplished nothing, but they've chosen to do these seemingly redundant activities on a regular basis to incrementally improve themselves. And it works. That's not a perfect analogy. Programming another version of something with lots of existing solutions is nothing like daily cardiovascular exercise.I know. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论