Did you know ... | Search Documentation: |
Title for pldoc(dir_index) |
This repository contains the software of http://www.swi-prolog.org. The (wiki) content of the website and required add-ons are stored in git submodules. These must be installed separately using the command below. To install the site from scratch locally, perform the following commands:
% git clone https://github.com/SWI-Prolog/plweb.git % cd plweb % git submodule update --init
<dl> <dt>annotations.db</dt> <dd>Comments on web pages</dd> <dt>tags.db</dt> <dd>Tags on web pages</dd> <dt>openid.db</dt> <dd>User administration</dd> <dt>packs.db</dt> <dd>Known packages</dd> <dt>post.db</dt> <dd>News posts</dd> <dt>reviews.db</dt> <dd>Pack reviews</dd> <dt>download</dt> <dd>Points to the download directory</dd> </dl>
Install the download descriptions by running the script install-custom
% mkdir log pack % chgrp www-data log pack % chmod g+ws log pack
After installation, the website may be started locally using the commands below. After that, you have access to the same content as available from https://www.swi-prolog.org, except for the download section of the website. The default port of the site is 3040, and therefore it may be accessed on http://localhost:3040/
% swipl -l load.pl ?- server.
A good way to run the website on a Linux server is by creating a Linux
container using lxc. After installing the server, you can enable it to
start at boot time by copying upstart/swi-prolog.conf
to `/etc/init`
after editing it to suit your configuration requirements. By default,
the server runs as user www-data
, group www-data
as specified in the
above configuration file.
Make sure the following components are writeable to the server process. For files, this means mode 664, group www-data. For directories, this means mode 2775, group www-data.
% git checkout master % git pull % git checkout -b wiki % find . -type d | xargs chmod 2775 % find . -name '*.txt' | xargs chmod 664 % chgrp -W www-data .
?- set_setting(recaptcha:public_key, 'public key goes here'). ?- set_setting(recaptcha:private_key, 'private key goes here'). ?- save_settings.
annotation.pl -- Annotation | ||
---|---|---|
annotation/3 | Show annotations for Object. | |
api.pl | ||
autocomplete.pl -- SWI-Prolog website autocompletion support | ||
blog.pl | ||
changelog.pl | ||
customise.pl | ||
daemon.pl | ||
did_you_know.pl -- Interesting snippets about SWI-Prolog | ||
download.pl | ||
examples.pl | ||
ex_xref/3 | ||
index_examples/0 | Update the example index. | |
reindex_examples/0 | Update the example index. | |
fastly.pl -- Purge pages on our CDN | ||
footer.pl -- Footer | ||
forum.pl | ||
generics.pl -- Generics | ||
git_html.pl | ||
gitweb.pl -- Provide gitweb support | ||
holidays.pl | ||
http_cgi.pl -- Run CGI scripts from the SWI-Prolog web-server | ||
load.pl | ||
make.pl | ||
markdown.pl -- Parse markdown documents into a DOM | ||
markdown_dom/2 | Process markdown input into an HTML DOM structure compatible to load_structure/3 and html//1 as provided by library(http/html_write). | |
markitup.pl -- Wrapper for markItUp ajax markup editor | ||
messages.pl -- Run goals that produce messages | ||
news.pl -- News on the SWI-Prolog Web site | ||
notify.pl -- Send notications by E-mail | ||
object_support.pl -- Object support | ||
openid.pl -- Handle users of the SWI-Prolog website | ||
create_user/1 | Create a new user for the given Google Profile. | |
login_existing_user/1 | True if the user is know to us and thus we can perform the login without further interaction. | |
authenticate/3 | Get authentication for editing wiki pages. | |
current_user/2 | ||
grant/2 | Grant/revoke User (a UUID) the right to access Token. | |
login_link/3 | Create a link to login, which returns to the current page. | |
redirect_master/1 | Redirect a request to the master server, so we do not have to deal with multiple versions of the database files. | |
revoke/2 | Grant/revoke User (a UUID) the right to access Token. | |
site_user/2 | Demand the user to be logged on and, if this is the first logon, verify the user and create a profile. | |
site_user_logged_in/1 | True when User is logged on. | |
user_profile_link/3 | Create a link to the profile of a user. | |
xrds_specified_location/2 | Hacks to deal with broken Yadis support. | |
pack.pl | ||
pack_analyzer.pl -- Analyse the content of a Prolog pack | ||
pack_info.pl -- Visual (web) components that show info about packs | ||
pack_mirror.pl -- Mirror pack archives | ||
page.pl | ||
parms.pl | ||
server/2 | Describe known servers and their role. | |
server/3 | Describe known servers and their role. | |
plweb.pl -- Server for PlDoc wiki pages and SWI-Prolog website | ||
post.pl -- Posts | ||
add_post_link/4 | Emit HTML that allows for adding a new post. | |
all/1 | News filter, returning all objects. | |
find_posts/3 | True when Ids is a list of all posts of Kind for which call(CheckId, Id) is true. | |
fresh/1 | True if post Id is considered fresh. | |
post/3 | True if Post have Value for the given attribute. | |
post/4 | Generate HTML for apost. | |
post_process/2 | HTTP handler that implements a REST interface for postings. | |
posts/6 | Generate HTML for a list of posts and add a link to add new posts. | |
relevance/2 |
| |
user_post_count/3 | True when Count is the number of posts of Kind created by User. | |
user_posts/4 | Show posts from a specific user of the specified Kind. | |
user_vote_count/3 | Number of votes issued by this user. | |
proxy.pl | ||
rating.pl -- Provide a star-rating widget | ||
register.pl | ||
review.pl -- Handle rating and reviewing of packages | ||
stats.pl -- Server statistics components | ||
http_server_pool_table/2 | Display table with statistics on thread-pools. | |
http_server_statistics/2 | HTML component showing statistics on the HTTP server. | |
http_session_table/2 | HTML component that writes a table of currently logged on users. | |
tagit.pl | ||
ac_object/3 | Provide additional autocompletion matches on tags,. | |
tagit_footer/4 | Show tagit widget for adding and deleting tags. | |
user_tags/4 | Show all tags created by a given user. | |
test_recaptcha.pl | ||
tests.pl | ||
update.pl | ||
watchdog.pl | ||
wiki.pl | ||
extract_title/3 | Extract the title from a wiki page. | |
file/4 | Trap translation of \file(+Path, Options) . | |
include/5 | ||
index_wiki_pages/0 | Create a (title) index of the available wiki pages. | |
safe_file_name/1 | True when Name is a file without references to parent directories. | |
title_text/2 | Turn the title, represented as an argument to html//1 into a plain string. | |
update_wiki_page_title/1 | Update the cached information about a wiki file. | |
wiki_file_to_dom/2 | DOM is the HTML dom representation for the content of File. | |
wiki_page_title/2 | True when Title is the title of the wiki page at Location. | |
wiki_edit.pl -- Edit PlDoc wiki pages |