Script to generate static site?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fred

    Script to generate static site?

    Hello,

    After looking at various CMS tools, either server- (Drupal,
    Pivot, etc.) or desktop-based (CityDesk, Cute Site Builder), it
    occured to me that I really didn't need something that sophisticated
    just to add navigation bars in each article on my site, and generate
    the home page with hyperlinks to each article.

    I figured all it took is a script that ...
    1. takes each raw HTML article that the user has generated with the
    editor of his choice (I prefere Namo's WYSIWYG editor, but it doesn't
    matter),
    2. extract infos on this document from the HEAD section and the
    content in the BODY section,
    3. run this through a template where keywords will be replaced with
    the content, and
    4. save the result into a full HTML page.
    5. Once the articles have been generated, just build the home page to
    list all those articles.

    So... before I write this myself, does someone know of a good solution
    to run on Windows, either as a command-line script or GUI-based?

    Thank you for any tip
    Fred.
  • Andy Dingley

    #2
    Re: Script to generate static site?

    Fred <fred@acme.co m> wrote in message news:<i31md0h2f pqls1didb7qefr4 us4hmmc4uv@4ax. com>...
    [color=blue]
    > So... before I write this myself, does someone know of a good solution
    > to run on Windows, either as a command-line script or GUI-based?[/color]

    XSLT

    Yet another reason to do your authoring in XHTML

    Comment

    • Brian

      #3
      Re: Script to generate static site?

      Andy Dingley wrote:
      [color=blue]
      > XSLT
      >
      > Yet another reason to do your authoring in XHTML[/color]

      So XSLT cannot be used to transform XML to HTML?

      --
      Brian (remove ".invalid" to email me)

      Comment

      • Matthias Gutfeldt

        #4
        Re: Script to generate static site?

        Brian wrote:[color=blue]
        > Andy Dingley wrote:
        >[color=green]
        >> XSLT
        >>
        >> Yet another reason to do your authoring in XHTML[/color]
        >
        >
        > So XSLT cannot be used to transform XML to HTML?[/color]

        You didn't understand what he wrote! The point was that a transformation
        is easier done when the file is clean, valid, W3C-compliant XHTML,
        instead of tag-soup.

        Why anybody would want to use XSLT for what's essentially a simple regex
        is beyond me, though. I guess I just understand this complex stuff.


        Matthias

        Comment

        • Brian

          #5
          Re: Script to generate static site?

          Matthias Gutfeldt wrote:[color=blue]
          > Brian wrote:
          >[color=green]
          >> Andy Dingley wrote:
          >>[color=darkred]
          >>> XSLT
          >>>
          >>> Yet another reason to do your authoring in XHTML[/color]
          >>
          >> So XSLT cannot be used to transform XML to HTML?[/color]
          >
          > You didn't understand what he wrote![/color]

          Perhaps.
          [color=blue]
          > The point was that a transformation is easier done when the file is
          > clean, valid, W3C-compliant XHTML, instead of tag-soup.[/color]

          But the op was asking for a cms solution. It appears that XSLT would be
          used to process server side content into web pages viewable to the www.
          If that is the case, can XSLT transform content into HTML? Or can it
          only transform e.g. XML into XHTML? I've never played with it, so I
          don't know.

          --
          Brian (remove ".invalid" to email me)

          Comment

          • Martin Honnen

            #6
            Re: Script to generate static site?



            Brian wrote:

            [color=blue]
            > It appears that XSLT would be
            > used to process server side content into web pages viewable to the www.
            > If that is the case, can XSLT transform content into HTML? Or can it
            > only transform e.g. XML into XHTML?[/color]

            XSLT has three output modes (at least in XSLT 1.0): xml, html, and text,
            so XSLT can be used to transform XML to X(HT)ML, HTML, or plain text:
            The World Wide Web Consortium (W3C) is an international community where Member organizations, a full-time staff, and the public work together to develop Web standards.

            --

            Martin Honnen


            Comment

            • William Park

              #7
              Re: Script to generate static site?

              Fred <fred@acme.co m> wrote:[color=blue]
              > Hello,
              >
              > After looking at various CMS tools, either server- (Drupal,
              > Pivot, etc.) or desktop-based (CityDesk, Cute Site Builder), it
              > occured to me that I really didn't need something that sophisticated
              > just to add navigation bars in each article on my site, and generate
              > the home page with hyperlinks to each article.
              >
              > I figured all it took is a script that ...
              > 1. takes each raw HTML article that the user has generated with the
              > editor of his choice (I prefere Namo's WYSIWYG editor, but it doesn't
              > matter),
              > 2. extract infos on this document from the HEAD section and the
              > content in the BODY section,
              > 3. run this through a template where keywords will be replaced with
              > the content, and
              > 4. save the result into a full HTML page.
              > 5. Once the articles have been generated, just build the home page to
              > list all those articles.
              >
              > So... before I write this myself, does someone know of a good solution
              > to run on Windows, either as a command-line script or GUI-based?
              >
              > Thank you for any tip
              > Fred.[/color]

              Any example?

              --
              William Park, Open Geometry Consulting, <opengeometry@y ahoo.ca>
              Q: What do you use to remove bugs on Windows? A: Windex.

              Comment

              • Andy Dingley

                #8
                Re: Script to generate static site?

                On Fri, 25 Jun 2004 15:32:38 GMT, Brian
                <usenet3@juliet remblay.com.inv alid> wrote:
                [color=blue][color=green]
                >> Yet another reason to do your authoring in XHTML[/color]
                >
                >So XSLT cannot be used to transform XML to HTML?[/color]

                Of course. But it can't be used to transform HTML that's not authored
                as well-formed XML into anything.

                Yesterday I worked on a static site with large numbers of
                hand-authored pages (a technical book). It began as unformatted
                plaintext from OCR, then I went through by hand and added XHTML markup
                to it.

                Most of this effort went into marking up the reference citations in a
                structured manner; with <cite> and then <span class="publishe r" > etc.
                internally. I also had to add plenty of <a name...> anchors around the
                section headings, as link targets.

                Then it was time for XSLT. With two pretty simple stylesheets, I'd
                extracted the table of contents and reference pages, with full links
                and everything. Doing that alone saved me _hours_ of work.


                Even in the simplest and most static of cases, XML & XSLT techniques
                have something to offer for solving CMS problems.

                --
                Smert' spamionam

                Comment

                • Fred the man

                  #9
                  Re: Script to generate static site?

                  On 25 Jun 2004 22:18:34 GMT, William Park <opengeometry@y ahoo.ca>
                  wrote:[color=blue]
                  >Any example?[/color]

                  Well, since I couldn't find anything, I wrote something in PowerBasic
                  this afternoon :-) Just some greping around, and mixing a document
                  with a template before rebuilding index.html.

                  Thx
                  Fred.

                  Comment

                  • William Park

                    #10
                    Re: Script to generate static site?

                    Fred the man <fred@acme.co m> wrote:[color=blue]
                    > On 25 Jun 2004 22:18:34 GMT, William Park <opengeometry@y ahoo.ca>
                    > wrote:[color=green]
                    > >Any example?[/color]
                    >
                    > Well, since I couldn't find anything, I wrote something in PowerBasic
                    > this afternoon :-) Just some greping around, and mixing a document
                    > with a template before rebuilding index.html.[/color]

                    If PowerBasic can do it, then Bash shell certainly can. :-)
                    Compare the best free open source Software Development Software at SourceForge. Free, secure and fast Software Development Software downloads from the largest Open Source applications and software directory

                    Compare the best free open source Software Development Software at SourceForge. Free, secure and fast Software Development Software downloads from the largest Open Source applications and software directory


                    --
                    William Park, Open Geometry Consulting, <opengeometry@y ahoo.ca>
                    Q: What do you use to remove bugs on Windows? A: Windex.

                    Comment

                    • Fred the man

                      #11
                      Re: Script to generate static site?

                      On 27 Jun 2004 04:06:05 GMT, William Park <opengeometry@y ahoo.ca>
                      wrote:[color=blue]
                      >If PowerBasic can do it, then Bash shell certainly can. :-)[/color]

                      I'm sure it does, but since I'm primarily working with Windows, I'd
                      rather a small EXE with no dependencies :-)

                      Fred.

                      Comment

                      Working...