On the smallpicture-user list, Andy DeSoto asks a great question about the built-in slogan macro. He wants to know where it's defined. That isn't the issue, if you don't like the way it works, you can override it, by writing your own version of the macro, and putting it in your cmsPrefs.opml file.
If you look in my cmsPrefs.opml file, which you can view on this page, you'll see that I've defined several macros. If you define your own #macros table, and put a script in there called slogan and have it return the empty string, you'll basically void the built-in routine.
Here's a screen shot of the macros table with this new version of the slogan macro.
Here's the docs page on defining your own macros.
And to answer the original question -- the built-in macros really are built-in, they're not in a place that you can edit them.
Fargo's CMS is the continuation of a series of content systems developed at UserLand, going back to the mid 1990s.
There were thousands of people doing websites with it.
The first blogging software was developed in Frontier's CMS.
Here's the outline behind the Kim Parker blog website. It's a simple example site that shows how the basic ideas of Fargo's CMS hang together.
The Frontier CMS used the hierarchy of the object database to project values over the content as it was rendered. So a #template, for example, could be overridden by placing another #template at a deeper level.
The same hierarchy works in Fargo but there is no object database. But each outline acts like an object database. It can contain lots of documents, each of which is rendered onto its own HTML page.
In Fargo, as in Frontier, any headline node can have as many attributes as you want to put on it. These attributes also act like #directives.
Frontier had a pagetable, and so does Fargo, and it's built in exactly the same way.
In Frontier, all values used in rendering a page come from the same "root" or object database. Values from other databases can be included, but only through scripts that you provide that run as the page is rendered.
In Fargo, we made this richer.
Default values come from an OPML file that I maintain. Every copy of Fargo loads this file when the app initializes. This is where the default templates come from. There are global glossary elements that are available to all page renderings. In the 90s I played around with the idea of a global glossary, but it never came together. It works perfectly in Fargo, and it's not just a global glossary, it's a global everything. It took a long time to figure out how to do it, but it's in there now.
After that Fargo loads a file from your Dropbox folder called cmsPrefs.opml. It works exactly like my global file, but it's only broadcast for your own renderings. This lets you set up structures, scripts and values that are shared for all the pages you render on your system. You can override anything I have put in the globals file.
The attributes from the file you're rendering content from.
Frontier's website framework had three types of "filter" scripts -- firstFilter, pageFilter and finalFilter. Fargo only has finalFilter, however if there is a need for a firstFilter script it will support it.
Glossaries in Fargo exactly as they did in Frontier.
Fargo supports includes everywhere, support is baked into the framework at a very low level and they are transparent. This gives you an easy way to share definitions with other users. However, be careful, includes can slow down your rendering, significantly.
Review the docs for Fargo's CMS for other features that are new in this framework.
I thought now would be a good time to ask if people who have experience with Markdown have any ideas for Fargo's implementation.
How is it working for you?
Are there any problems, features you have to work around?
Any feedback would be welcome.
RSS feeds now have rendered Markdown. Glossary elements from the global glossary and from cmsPrefs.opml are evaluated. See the Rendering for feeds post for entities that are not evaluated in feed rendering.
Fixed a few more icons from the Font Awesome 4.0 integration.
The Open by name command in the File menu now remembers the name of the last opened outline.
Fixed a layout problem in the Outliner menu where command key names would overwrite the name of the command. Widened all the menus by 20 pixels.
Fixed a problem in the default outline template where the wedges that expand and collapse the comments would be invisible.
<%slogan ()%> to the bottom of the page in the default outline template.
In version 1.50, coming in the next couple of days, Fargo will do a lite render of RSS descriptions.
It passes the text through the global glossary.
It passes the text through your cmsPrefs.opml glossary, if you have one.
It passes the text through the Markdown processor.
This will help the text in the feed look good in whatever RSS apps your readers are using. But it will still leave macros unprocessed, and it won't use any local glossaries. And the pagetable elements, if you reference them, will be unevaluated.
These things are difficult, but not impossible. However there are lots of other things that are higher priority.
Also, you have to watch out for glossary items that depend on the runtime environment of Fargo-generated pages. Anything that depends on Font Awesome being present, or Bootstrap Toolkit, won't work. I do that in my smiley characters.
But the cheesecake glossary entry should render fine.
I want to spend some time using the new version myself (I'm using it now) before making it part of the main release. This is tricky stuff and I want to be sure I got it right.
This was not a small change, unfortunately, even though the goal was to make it appear as if it was a small change. Please watch for breakage.
While I was working in this area I made it so that the left and right arrow keys move between panels in the Icon Chooser dialog (accessible from the Outliner menu in Fargo).
I also updated the GitHub project.
Font Awesome is still very awesome.
But I wish they wouldn't rock the boat so much.
We've baked in support for this excellent toolkit deeply in Fargo. Such deeply integrated things are not easily replaced, especially when lots of small seemingly unnecessary changes are made.
As Fargo was booting up, if there was a watched outline in tabs.json, it would fail.
Frank reported that the icons wouldn't show up, but when I reproduced the problem it was even more serious -- the app itself didn't load.
The problem was introduced when I added Fargo Publisher support to Fargo. When the app is booting, appPrefs hasn't yet been set up, so when it tried to read the watched outline, it would fail. I added some defensive driving to the boot-up process to delay the read until the app was fully initialized. But there was some other initializing that wasn't happening, which would cause yet another failure.
I solved the problem by having Fargo use the default server to read watched outlines as it's starting up. Once the app is running, it uses the server that's in prefs.json.
Thanks to Frank McPherson for the excellent report.
If you want paragraph-level permalinks in your blog posts, there's a new directive, #flPgfPermaLinks.
If you set it to "true" your posts will have them, "false" to turn the feature off.
They are off by default.
If they're on, each paragraph in your blog post will have a small purple hash sign, that links to the paragraph. If a reader wants to point to a specific paragraph in the post, they can use the URL from the hash sign.
The link is formed from the first characters of the first five words in the paragraph. You can move the paragraph around on the page without breaking links. However, if you change one of the first five words in the paragraph, links to it will break.
If you want the feature on by default for your websites, you can put the directive in your cmsPrefs.opml file.
For some Fargo users, the standard key mappings get in the way of the normal functioning of the browser. Now we have a way to disable individual key mappings, or add new ones. It's very geeky, so I'm calling it an experiment to see if it helps.
Suppose you want to disable Fargo's mapping for Cmd-[ for Promote.
In the System menu, the one at the right edge of the menu bar with your name as its title, choose the Settings command.
Click on the Code panel.
Enter this bit of code:
concordKeystrokes ["meta-["] = "";
Press Cmd-[ on a headline with subs. If it worked, it should do nothing.
Here's a list of the standard key mappings in Fargo.
On Macs, the "meta" key is Cmd. On Windows and Unix it's Control.
If you're a regular Fargo user, please subscribe to this RSS feed.
I will try to post notes about new features and ideas on this blog.
If you like to read my thoughts about movies, weather, the Knicks as well as tech, you could also subscribe to the Scripting News feed. I will also talk about Fargo there from time to time, but it's a regular blog so, you have to endure the other stuff too.