Skip to content

Commit

Permalink
fix Issue 16147 - Provide shiny 404 error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberShadow committed Nov 8, 2016
1 parent 28ddcec commit dc537e5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ version|traits|errors|unittest|garbage|float|iasm|ddoc|interfaceToC|\
cpp_interface|objc_interface|portability|entity|memory-safe-d|abi|simd)\
(\.html)?$ \
spec/$1.html [R=301,L]

# Error pages
ErrorDocument 404 /404.html
12 changes: 12 additions & 0 deletions 404.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Ddoc

$(D_S 404 Not Found,

$(P
Page not found!

If you think there should be something here, please use the "Report a bug" link above to let us know.
))

Macros:
TITLE=404 Not Found
2 changes: 1 addition & 1 deletion posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ CHANGELOG_FILES=$(basename $(subst _pre.dd,.dd,$(wildcard changelog/*.dd)))
# Website root filenames. They have extension .dd in the source
# and .html in the generated HTML. Save for the expansion of
# $(SPEC_ROOT), the list is sorted alphabetically.
PAGES_ROOT=$(SPEC_ROOT) acknowledgements areas-of-d-usage \
PAGES_ROOT=$(SPEC_ROOT) 404 acknowledgements areas-of-d-usage \
articles ascii-table bugstats.php builtin \
$(CHANGELOG_FILES) code_coverage community comparison concepts \
const-faq cpptod ctarguments ctod \
Expand Down
6 changes: 4 additions & 2 deletions win32.mak
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DMD=dmd
DPL_DOCS_PATH=dpl-docs
DPL_DOCS=dub run --root $(DPL_DOCS_PATH) --

SRC= $(SPECSRC) cpptod.dd ctod.dd pretod.dd cppcontracts.dd index.dd overview.dd \
SRC= $(SPECSRC) 404.dd cpptod.dd ctod.dd pretod.dd cppcontracts.dd index.dd overview.dd \
mixin.dd faq.dd \
dstyle.dd wc.dd \
changelog\2.000.dd changelog\2.001.dd changelog\2.002.dd \
Expand Down Expand Up @@ -94,7 +94,7 @@ SPECTARGETS=spec\spec.html spec\intro.html spec\lex.html \
spec\objc_interface.html spec\portability.html spec\entity.html \
spec\memory-safe-d.html spec\abi.html spec\simd.html

TARGETS= $(SPECTARGETS) cpptod.html ctod.html pretod.html cppcontracts.html index.html overview.html \
TARGETS= $(SPECTARGETS) cpptod.html ctod.html pretod.html cppcontracts.html 404.html index.html overview.html \
mixin.html \
faq.html dstyle.html wc.html \
changelog\2.000.html changelog\2.001.html changelog\2.002.html \
Expand Down Expand Up @@ -174,6 +174,8 @@ dmd-osx.html : $(DDOC) osx.ddoc dcompiler.dd
dmd-windows.html : $(DDOC) windows.ddoc dcompiler.dd
$(DMD) -o- -c -D $(DDOC) windows.ddoc dcompiler.dd -Dfdmd-windows.html

404.html : $(DDOC) 404.dd

acknowledgements.html : $(DDOC) acknowledgements.dd

articles.html : $(DDOC) articles.dd
Expand Down

0 comments on commit dc537e5

Please sign in to comment.