1. Oben Sonne
  2. poole
  3. Issues


Issue #1 resolved

Issues with default site

created an issue

The site that Poole generates by default has some issues.

First, poole adds a slash in front of the css file path in page.html during generation. It is being looked for in the root directory, which means that pages do not have css applied to them when they are not displayed via poole.py --serve

Example: <link rel="stylesheet" type="text/css" href="/poole.css" />

Second, the inline statements don't appear to work. The menu-position code in page.html does not appear to be executed. The resulting pages have text such as "menu-position: 4" in them.

Comments (8)

  1. Oben Sonne repo owner

    Poole creates absolute links when building a site. The default base URL for a link is /, that's why there's a slash before poole.css. If you want to browse the site locally, without serving it, you could set an absolute file:// URL as the base URL. For instance like this:

    $ cd /path/to/poole-project
    $ poole.py --build --base-url=file://$PWD/output/

    This creates links like this:

    <link rel="stylesheet" type="text/css" href="file:///path/to/poole-project/output/poole.css" />

    I cannot reproduce the second problem concerning the menu positions. It works for me using the current Poole version and it's example project built by the --init argument. If you see things like menu-position: 4 then it is more likely that the actual page files written in markdown are broken. Looks like the 3 or more dashes separating the page variables (for instance menu-position) and the page content is missing. In that case Poole does not recognize line like menu-position: 4 as page variables but as content so that they end up in the final HTML page.

  2. jamesgecko reporter

    Re: base URL

    Ah, that explains it. I got the desired behavior using "--base-url=."

    Re: menu-position

    I'm not sure. The three dashes are definitely present in the input files and I haven't changed them or poole.py. I've redownloaded poole and re-inited and generated the site with the same results. I'm running Python 2.6.3 on Windows 7. Could this be a platform specific issue?

  3. Oben Sonne repo owner
    • changed status to open

    Yes, the menu-positon issue may be a platform specific problem. Could you please attach a zip of the output directory after running poole.py --build in a freshly initialized Poole project? Maybe I can figure out what's the problem.

  4. Oben Sonne repo owner

    My initial guess partly was right, the ruler separating variables and content has not been recognized. I'm quite sure the problem is that line breaks on Windows are different than on Linux.

    To check this, replace line 279 in poole.py:

        _re_eom = re.compile(r'^---+ *\n?$')


        _re_eom = re.compile(r'^---+ *\r?\n?$')

    This refers to revision 58e824361fd7 , pushed some minutes ago.

  5. Log in to comment