MoinMoin as a plain old CMS

Just a quick summary of the most expedient way to use MoinMoin as a content management sysyem, as I currently used to do for www.ssokolow.com. This is primarily about the parts which are less useful for Wikis, so visit the MoinMoin site for things like non-default themes.

# Set these in wikiconfig.py

sitename = u"Your site's name here"
theme_default = 'rightsidebar'
theme_force = True

page_front_page = u"SiteContents"
language_default = 'en'
language_ignore_browser = True

acl_rights_before = u"YourUserName:read,write,delete,revert,admin"
acl_rights_default = u"All:read"

html_head = ''
logo_string = u'YourSite.com Logo'
page_footer2 = """Google Analytics Code Here"""

page_credits = ["this sets the",
 "credits like 'Valid HTML'", "in the footer"]

navi_bar = [
    u'%(page_front_page)s',
    u'RecentChanges',
    u'FindPage',
    u'ContactMe',
    u'OtherPageYouWant',
    u'AndSoOn',
]

…and then delete pages in the underlay which you don’t need. You can use the WantedPages page to figure out what needs to be edited to no longer refer to them.

To change the name of the sidebar’s top section from “Wiki” to “Site”, copy rightsidebar.py to data/plugin/theme and edit line 23. (Before you edit, it should look as follows)

    u'<h1>%s</h1>' % _("Wiki"),

The Project Wonderful ads are a little more involved, but it looks sort of like this: (again, in rightsidebar.py)

    def header(self, d):
        . . .
        self.userpanel(d),
        """<div class="sidepanel"><h1>Ads</h1>
            <!-- Begin Project Wonderful ad code: -->
            . . .
            <!-- End Project Wonderful ad code. -->
            </div>""",
        u'</div>',

Of course, keep in mind that this is Python code and make a backup if you aren’t familiar with the syntax.

Finally, to embed bits of HTML into pages like I did for the ContactMe page, make sure that only trustworthy people have edit privileges and then install the raw parser.

CC BY-SA 4.0 MoinMoin as a plain old CMS by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This entry was posted in Geek Stuff. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.

All comments are moderated. If your comment is generic enough to apply to any post, it will be assumed to be spam. Borderline comments will have their URL field erased before being approved.