Skip to content

Commit

Permalink
.htaccess now gets generated
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Boës committed Sep 14, 2016
1 parent e832ca2 commit 59d0e63
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 27 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/htdocs/*
!/htdocs/.htaccess
/log
/logs
/node_modules
Expand Down
26 changes: 0 additions & 26 deletions htdocs/.htaccess

This file was deleted.

3 changes: 3 additions & 0 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ inquirer.prompt(questions).then(
}

shell.mkdir('-p', defaultValues.directories.data);
shell.mkdir('-p', defaultValues.directories.htdocs);

shell.cp('./src/templates/.htaccess', defaultValues.directories.htdocs);
//console.log(answers);

['/css', '/js'].forEach(function(link) {
Expand Down
13 changes: 13 additions & 0 deletions src/templates/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
AddType text/xml xml rss atom
AddType text/plain .md
AddType application/json .json
AddCharset utf-8 .html .css .js .rss .atom .xml .md .json .txt
ErrorDocument 404 /404.html
ErrorDocument 410 /404.html
DirectoryIndex index.html

# General Blogophon redirects
RedirectMatch 301 ^/htdocs/(.*)$ /$1
RedirectMatch 301 ^/posts/?$ /

# Add your stuff here

0 comments on commit 59d0e63

Please sign in to comment.