Apostrophe 2.30.0 has been released. Starting with the 2.29.0 release a few days ago and rolling through today, various small changes to accommodate the newly released 2.x version of the apostrophe-workflow module have been added. That new module also provides localization features. Check the next post for more about that module, which is installed separately as not every project requires workflow.
In addition there are other welcome additions, such as:
- Multiple select for tag filters and other filters in the “manage” view
- Easy to implement “Next” and “previous” for pieces-pages
- Easy to store sessions in Redis
- You no longer have to spell out which of your npm modules are “bundles;” Apostrophe automatically detects “bundles” that contain multiple Apostrophe modules
Here is the full list of new functionality and fixes.
Thanks to Michelin for their support of much of this work.
** 2.30.0
It is now easier to set up Redis or another alternative session store:
'apostrophe-express': {
session: {
secret: 'your-secret-here',
store: {
name: 'connect-redis',
options: {
// redis-specific options here
}
}
}
}
For bc, you can still pass a live instance of a store as the store
option, but this way is easier; all you have to do is npm install --save
your connect-compatible session store of choice and configure it.
Thanks to Michelin for their support of this work.
** 2.29.2
- Overridable widgetControlGroups method takes (req, widget, options) allowing for better control when customizing these buttons.
- The
createControls
option of theapostrophe-pages
module is now respewcted properly.
** 2.29.1
- Fixed a short-lived issue with the reorganize feature.
** 2.29.0
This is a significant update containing various accommodations required by the shortly forthcoming Apostrophe 2.x version of the apostrophe-workflow
module, as well as other recent enhancements in our queue.
-
Editing an area “in context” on the page when it is part of a widget or piece will always work, even if
contextual: true
was not set. That property is optional and prevents the area from also appearing in the dialog box for editing the content type. -
Multiple select filters are now available for the “manage” view of any piece type. Just like configuring single-select filters, except that you’ll add
multiple: true
to the relevant object in youraddFilters
configuration for the module. Thanks to Michelin for their support of this work. -
When editing a previous selection of pieces for a join or widget, you can also easily edit them without locating them again in the manage view.
-
“Next” and “previous” links can now be easily added to your
show.html
pages for pieces. Just set thenext
andprevious
options for yourapostrophe-pieces-pages
subclass totrue
, or to an object with aprojection
property for best performance. This will populatedata.previous
anddata.next
in yourshow.html
template. For blogs they may seem backwards; they refer to relative position on the index page, and blogs are reverse-chronological. Just switch the terms on the front end in your template in cases where they appear confusing. -
There is now a “pages” option on the admin bar, for cases where “reorganize” is not visible because “Page Settings” is not accessible to the user for the current page.
-
If the
trashInSchema
option is set totrue
when configuringapostrophe-docs
, pages that are in the trash retain their position in the page tree rather than moving to a separate “trash” subtree. In the “reorganize” interface, they are grouped into trash cans displayed beneath each parent page, rather than a single global trash can. This is necessary for the new workflow module and also helpful in any situation where trying to find pages in the trash is more troublesome than explaining this alternative approach.
When trashInSchema
is true
, users can also change the trash status of a piece or page via “Page Settings” or the “Edit” dialog box of the piece, and it is possible to access “Page Settings” for any page via “Reorganize.”
-
The buttons displayed for each widget in an Apostrophe area can be adjusted via the
addWidgetControlGroups
option of theapostrophe-areas
module, which can be used to introduce additional buttons. -
Empty
beforeMove
andafterMove
methods have been added to theapostrophe-pages
module for the convenience of modules usingimprove
to enhance it. -
The
apostrophe-doc-type-manager
module now hasgetEditPermissionName
andgetAdminPermissionName
methods. These can be overridden by subclasses. For instance, all page subtypes returnedit-apostrophe-page
for the former because page types can be changed. -
apos.destroy(function() { ... })
may be called to shut down a running Apostrophe instance. This does not delete any data. It simply releases the database connection, HTTP server port, etc. This mechanism is extensible by implementing anapostropheDestroy
method in your own module. -
before
option forexpressMiddleware
. As before any module can provide middleware via anexpressMiddleware
property which may be a function or array of functions. In addition, if that property is an object, it may also have abefore
subproperty specifying a module whose middleware should run after it. In this case the actual middleware function or functions must be in amiddleware
subproperty. -
apos.instancesOf(name)
returns an array of modules that extendname
or a subclass of it.apos.instanceOf(object, name)
returns true if the givenobject
is a moog instance ofname
or a subclass of it. -
apos.permissions.criteria
can now supply MongoDB criteria restricted to the types the user can edit when a general permission name likeedit
oredit-doc
is asked for. This was never a security bug because permissions for actual editing were checked when individual edits occurred. The change makes it easier to display lists of editable content of mixed types. -
Extending the indexes of Apostrophe’s
aposDocs
collection is easier to achieve in modules that useimprove
to extendapostrophe-docs
. -
Removed tests for obsolete, unsupported Node.js 0.10.x. Node.js 4.x is now the minimum version. We do not intend to break ES5 compliance in 2.x, however testing old versions of Node that are not maintained with security patches in any freely available repository is not practical.
-
insert
method forapos.attachments
, mirroring the other modules better. Thanks to Arthur Agombart.