OK, what I did was subclass PRDistribution with PRCodeWikiDistribution.

I created
PRCodeWikiDistribution>>blog
blog
    ^ blog ifNil: [
        blog := (PBBlog named: 'blog')

        yourself
    ].



Then from within the Blog  page, I added a new Blog post via the web interface and saved


However, the first post doesn't show up in the widget listing new blog posts. I found that if I manually created a new blog post from within >>blog...

blog
^ blog ifNil: [
        blog := (PBBlog named: 'blog')
        addChild: (
            (PBPost named: 'test')
            title: 'Down to test';
            contents: 'test';
            publication: TimeStamp now
                );
            yourself

    ].


It works. I just wasn't clear on all the stages required to start from scratch. As far as I can tell, the first PBPost has to be created from with the >>blog method.


Next up, creating a Pier sidebar that can display existing code, e.g. http://www.morphle.org:8502

as well as a login input pane so that my Second Life nano-client written in squeak can be used to log into  Second life and display incoming/outgoing packets, and eventually inject/modify those packets.


The idea is to create a combination journal/blog/wiki of coding, along with a way of annotating/commenting on the live code with UML-type diagrams for the SL client and for the SL client-server protocols, with an eye to letting people make suggestions on how to improve what is already working, while showing what is working.

None of the PRDistribution templates really does what I need, but the Blog template seems the closest to what I want to do. Part of the process will be getting suggestions from people on how to design the wiki/blog thingie.



Lawson

On 10/12/10 9:26 PM, Nick Ager wrote:
Hi Lawson,

 I'm trying to start a blog from scratch, but I can't get it to use the built-in functionality unless I subclass the PRDistribution code and add a "first entry" post within the method "blog".

What am I missing, or am I missing anything?

Not sure I understand what you're asking. Is it how do I create a new blog entry? If so:

login using admin/pier (login link bottom left)
navigate to /pier/blog
click on commands:add (link bottom left)
click on the add button
on the next form fill in "source title" "contents" and press the "current" button for the "publication" field then press "save" button

If instead your question is how do I define my own site which incorporates a blog? Then look at PRDistribution>>root as a starting point for your site's structure. Experiment by removing and adding components until you end up with a structure that works for you. In particular you might find the following lines within PRDistribution>>root a useful starting place for understanding how to customise the look and feel of your site:

self rootPage localEnvironment: self mainEnvironmentPage.
self blog localEnvironment: self blogEnvironmentPage.

which will lead you into examining:

PRDistribution>> mainEnvironmentPage
PRDistribution>> blogEnvironmentPage

Hope that helps

Nick