开发者

I dont know what im getting into

开发者 https://www.devze.com 2023-03-05 14:26 出处:网络
I really need you guys to help me out on this and clear up my mind. A little about what im doing: I\'m putting together a website that makes use of pre-written articles from another website. My HTML

I really need you guys to help me out on this and clear up my mind. A little about what im doing: I'm putting together a website that makes use of pre-written articles from another website. My HTML structure just makes use of a list for links to the articles and content towards the right of that list, and that's for every page. It sounds simple, but my client(friend) has 46 pre-written articles that I need to migrate into my code! My Process: Since I'm no pro at this, I came up with this plan. Copy each article from the website and save it in my word processor "Abi-Word Version 2.8" AS AN (X)HTML DOCUMENT. Then, view that (X)HTML document in a browser so that I can view the source and then copy the HTML code that is applied towards the content. In other words just the text. I did this so that I would not have to mark up the article my self with

tags every where etc... The copied HTML code kept most of the general spacings and quotations, but not as it was in the original website. My Problem: This Process has proven to be very tedious. Because every time I copy an article and go through the process I have to update each other page so that th开发者_运维技巧e links are the same on all the pages. And since these are just static pages, my friend is going to need me to update the code every time he writes a new article which is often.

I'm really getting discouraged because im new at this and dont really know whats going on. I just dont even see the point to hand coding in the first place because in the end, my friend is going to have a harder time updating and adding to his website because he now going to ahve to look for me as opposed to just using a web manager. I know some of you have spoke about CMS. I have looked into it a little, but im a still researching.

Does anyone have any advice for me or a flow chart to follow for the whole process? Is what im attempting to do worth it? if so what are the benefits?

I have much more to say but this is enough for now. If you guys need anymore information in order to help me let me know.


You definitely need a CMS. Try wordpress.com. It's probably the most popular one out there.


All of the CMS suggestions are valid, but not necessarily needed.

It really depends on the focus of your project, and it's future. The CMS are not small projects and they bring along with them their own complexities and issues beyond simple structure.

You also don't mention your hosting platform, which can be important as well.

A possibly simpler solution, is to look at something "old school" like Server Side Includes (SSI).

A SSI is a small comment embedded into your HTML that does some simple processing.

For you, you can do something such as create a single file that holds your Table of Contents list. Then, within your individual article, you provide a reference to that table of contents.

Such as:

<table>
    <tr>
        <td>
            <!-- #include file = "toc.html" -->
        </td>
        <td>
            <p> this is your article text</p>
        </td>
    </tr>
</table>

Now, when ever your Table of Contents changes, you simply change the toc.html file. All of your other files will load it dynamically when requested.

You can to the same thing for other bits (like the header, footer, etc.)

Also, you can include files in your include files.

So, taking the previous example you can have a file "header.html":

<table>
    <tr>
        <td>
            <!-- #include file = "toc.html" -->
        </td>
        <td>

then a file "footer.html"

        </td>
    </tr>
</table>

and then your article file becomes:

<!-- #include file = "header.html" -->
<p>Your article here</p>
<!-- #include file = "footer.html" -->

Really simple.

I suggest this simply because most servers support SSI readily (both Apache and IIS do), it's simple to do, and doesn't require a lot of other knowledge outside of some HTML.

Yes, a lot of folks have moved to more advanced tools like CMS's. But given you have a bunch of static content already, and not much other experience, this technique will likely get you out the gate without having to learn a whole new platform.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号