-
Notifications
You must be signed in to change notification settings - Fork 1
Setup
Clone, create config from .example and create first version of site. Used libraries are included as submodules.
Run ./make.sh
or _drf/make.php for the first run.
cd DIRECTORY/
git clone https://github.com/klml/drfrederson.git ./ --recursive
cp -r examples/. ./
cp _drf/config.global.yml _drf/config.local.yml ## local config OPTIONAL
./make.sh
The public site, where ever it is located (other server, CDN, etc), needs only html and assets (images, css, js) files.
The _drf/
-directory is needed for changing content. The make.php
has no role or user validation and is locked with htaccess by default.
For web-editing and web-administration.
echo 'AuthUserFile '"$( readlink -f _drf/.htpasswd )" >> _drf/.htaccess
htpasswd -c _drf/.htpasswd USERNAME
By default the .htaccess handles the DirectoryIndex and the mapping the URL to the filename by getting the content from the /html/
and removing .html
extension, to keep the file extension on the file, but refer to the web resource without it.
DirectoryIndex html/index.html # startpage
RewriteEngine On
RewriteRule ^([^\.]+)$ html/$1.html [NC,L] # get all content from html directory in the webroot without .html extension
RewriteRule ^(.*)_ver(.*).css$ $1.css [NC,L] # css and js versioning in the filename, not as ?v=1
ErrorDocument 404 /html/404error.html # fancy errorpages, also needed for creating new pages. Add webfolder if not in domainroot /drfrederson/html/404error.html
If you have no access or idea about htaccess, all pages deliverd plain in html
and with extension .html
, or:
- set path
directory
-html
to../
to get all pages in the webroot. - htmlextension to