# Ikiwiki for regular websites [[Ikiwiki]] can be used to build and administrate regular websites. Websites built with ikiwiki is more complex than plain static websites, but simpler than most web-based content management systems (CMS). This page provides a short introduction to using ikiwiki-based websites, aimed at website owners and webdesigners (but not [[technicians|tech]]). [[!toc levels=2]] ## Static web pages for static content Static content is information that is identical for any user reading it. Static web pages are created once and then served by the web server to all readers of the website: [[graph height=8 width=8 src=""" { reader [shape=house, label="Reader"] webpages_static [label="static pages"] reader -> webpages_static } """]] ikiwiki produce static web pages for all static content. ## Dynamic web pages for temporary content The website can have a search routine added. The form to do a search can be static, but the web page showing the search results is unique to each search: [[graph height=8 width=8 src=""" { reader [shape=house, label="Reader"] /* targets */ webpages_static [label="static pages"] webpages_searchresult [label="search results", style=dotted] {rank=same; webpages_static webpages_searchresult} search_query [shape=plaintext, label="search query"] search_db [shape=box, label="search index"] /* paths */ reader -> webpages_static reader -> search_query -> search_db -> webpages_searchresult } """]] ## Administration access Websites are normally meant to be published to the whole world, but only edited by a select few. ikiwiki-based websites have a separate address (typically replacing the leading "www" with "admin") with administration access added on top of all pages. ## Administration roles Often the website owner writes the text content themselves, but hire external web designers to structure the site and apply graphical "makeup". Typically, editors need simple access only to edit their texts, while web designers need freedom to express their creative ideas. ikiwiki-based websites are setup to reflect that: [[graph height=8 width=8 src=""" { /* roles */ reader [shape=house, label="Reader"] editor [shape=house, label="Editor"] designer [shape=house, label="Designer"] {rank=same; reader editor designer} /* targets */ webpages_static [label="website"] webpages_wiki [label="admin website"] {rank=same; webpages_static webpages_wiki} /* input data */ txt [shape=plaintext, label="text"] media [shape=plaintext, label="graphics"] tmpl [shape=plaintext, label="templates"] {rank=same; txt tmpl media} iki_engine [shape=box, label="web engine"] /* paths */ reader -> webpages_static [dir=back] editor -> txt -> iki_engine -> webpages_wiki designer -> media -> iki_engine designer -> tmpl -> iki_engine iki_engine -> webpages_static } """]] ## Editing In addition to the main website, an additional website is generated, with the main feature of Ikiwiki - [[wiki]]-like text editing - enabled: [[graph height=8 width=8 src=""" { editor [shape=house, label="Editor"] webpages_wiki [label="wiki pages"] content_form [shape=plaintext, label="edit form"] /* stored data */ txt_stored [shape=box, label="text content"] media_stored [shape=box, label="graphics files"] tmpl_stored [shape=box, label="html templates"] {rank=same; txt_stored media_stored tmpl_stored} /* paths */ editor -> webpages_wiki editor -> content_form -> txt_stored -> webpages_wiki media_stored -> webpages_wiki tmpl_stored -> webpages_wiki } """]] Whenever the wiki pages are edited, the static pages are also rebuilt: [[graph height=8 width=8 src=""" { /* roles */ editor [shape=house, label="Editor"] /* targets */ webpages_static [label="static pages"] webpages_wiki [label="wiki pages"] {rank=same; webpages_static webpages_wiki} /* input data */ content_form [shape=plaintext, label="edit form"] /* stored data */ txt_stored [shape=box, label="text content"] media_stored [shape=box, label="graphics files"] tmpl_stored [shape=box, label="html templates"] {rank=same; txt_stored media_stored tmpl_stored} iki_engine [shape=box, label="html renderer (ikiwiki)"] /* paths */ editor -> content_form -> txt_stored -> iki_engine -> webpages_wiki media_stored -> iki_engine tmpl_stored -> iki_engine iki_engine -> webpages_static } """]]