Site creation directories

Previous page Next page

Keyword files

One of the tasks of the program make_pages is to add keywords to the meta data keyword field. It is important to use page-specific keywords for each page and not to stuff the list with "porn" and other popular search words to try to increase the number of hits received (it won't work anyway). You create a simple text file which contains keywords and phrases for the whole site. Program make_pages reads this list of site keywords and searches for them in the current page; any that match are added to the list shown in the meta data field.

The site-wide keyword list is a list of words or phrases, one per line. The beginning of the list of keywords for the sourgumdrop.org.uk site is shown in Figure 1.


17 clue sudoku puzzles                                       
3bv                                                          
9mer                                                         
algorithm                                                    
animation                                                    
benchmarks                                                   
boxes                                                        
brute force 

Figure 1. The start of the sourgumdrop.org.uk keyword file which is used to generate page-specific keyword lists.




Directory structure

The directory structure is important for the way I organise things for the web site. The program make_pages assumes some of this structure but is easily adapted to alternative arrangements.

At present the site describes four games: Minesweeper, Kakuro, Sokoban and Sudoku. Each of these has its own directory. The pages describing the web site creation methods have turned out to be more numerous than expected, so they also have their own directory (SITE_MAKER). The site also has some general pages, such as the home and download pages. These six higher directories each contain directories named DESCRIPTIONS and CONTENT. DESCRIPTIONS contains the page and menu description files and will contain the XHTML for the menu created by make_menu. CONTENT contains the web site content pages. These are the ones which most concern the user. The SCRIPTS directory contains the programs make_menu and make_pages. The COMPLETE directory is where make_pages will write the XHTML files that comprise the web site. It is assumed that the image files are located in the directory COMPLETE/images.



GAMES
 CONTENT
 DESCRIPTIONS menu_descriptions, page_descriptions, keywords
 SCRIPTS make_pages, make_menu
 COMPLETE complete pages, sourgumdrop.org.uk.css
  images
 MINESWEEPER
  CONTENT content xhtml
  DESCRIPTIONS page_descriptions, menu_descriptions
 KAKURO
  CONTENT content xhtml
  DESCRIPTIONS page_descriptions, menu_descriptions
 SUDOKU
  CONTENT content xhtml
  DESCRIPTIONS page_descriptions, menu_descriptions
 SOKOBAN
  CONTENT content xhtml
  DESCRIPTIONS page_descriptions, menu_descriptions
 SITE_MAKER
  CONTENT content xhtml
  DESCRIPTIONS page_descriptions, menu_descriptions
Figure 2. The directory structure for the sourgumdrop.org.uk files. Indentation denotes subdirectories. For example the path to the Minesweeper content files is GAMES/MINESWEEPER/CONTENT

What I'm describing here are the requirements for a site that is complicated enough to require two levels of menus. If the site being managed only has one menu, then 5/6ths of the above is unnecessary. Only the top set of directories (Figure 3) is needed and the 2 programs each need only be run once. In fact, as the menus rarely change, it is usually only necessary to run make_pages.



GAMES
 CONTENT
 DESCRIPTIONS menu_descriptions, page_descriptions, keywords
 SCRIPTS make_pages, make_menu
 COMPLETE complete pages, sourgumdrop.org.uk.css
  images

Figure 3. The directory structure for a site requiring only one level of menu.

Last updated: 2011-08-29    Sitemap