Skip to content

Commit 2a4276a

Browse files
committed
Update references to /articles pages
1 parent d5a1bf9 commit 2a4276a

File tree

4 files changed

+75
-55
lines changed

4 files changed

+75
-55
lines changed

.htaccess

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,23 @@ Redirect 301 /sponsors.html https://dlang.org/foundation/sponsors.html
6767
Redirect 301 /dlangupb-scholarship.html https://dlang.org/foundation/updscholarship.html
6868
Redirect 301 /donate.html https://dlang.org/foundation/donate.html
6969

70+
# Legacy article pages
71+
Redirect 301 /ctod.html /articles/ctod.html
72+
Redirect 301 /cpptod.html /articles/cpptod.html
73+
Redirect 301 /pretod.html /articles/pretod.html
74+
Redirect 301 /code_coverage.html /articles/code_coverage.html
75+
Redirect 301 /exception-safe.html /articles/exception-safe.html
76+
Redirect 301 /hijack.html /articles/hijack.html
77+
Redirect 301 /intro-to-datetime.html /articles/intro-to-datetime.html
78+
Redirect 301 /lazy-evaluation.html /articles/lazy-evaluation.html
79+
Redirect 301 /migrate-to-shared.html /articles/migrate-to-shared.html
80+
Redirect 301 /mixin.html /articles/mixin.html
81+
Redirect 301 /regular-expression.html /articles/regular-expression.html
82+
Redirect 301 /safed.html /articles/safed.html
83+
Redirect 301 /templates-revisited.html /articles/templates-revisited.html
84+
Redirect 301 /ctarguments.html /articles/ctarguments.html
85+
Redirect 301 /variadic-function-templates.html /articles/variadic-function-templates.html
86+
Redirect 301 /d-array-article.html /articles/d-array-article.html
87+
7088
# Error pages
7189
ErrorDocument 404 /404.html

articles/index.dd

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,72 +9,72 @@ $(D_S Articles,
99
$(DIVC boxes,
1010
$(DIVC row,
1111
$(DIVC item,
12-
$(H4 $(LINK2 $(ROOT_DIR)faq.html, FAQ))
12+
$(H4 $(LINK2 $(ROOT_DIR)articles/faq.html, FAQ))
1313
$(P Frequently answered questions about D.)
1414
)
1515
$(DIVC item,
16-
$(H4 $(LINK2 $(ROOT_DIR)const-faq.html, const(FAQ)))
16+
$(H4 $(LINK2 $(ROOT_DIR)articles/const-faq.html, const(FAQ)))
1717
$(P Frequently answered questions about D's $(D const) and
1818
$(D immutable).)
1919
)
2020
)
2121
$(DIVC row,
2222
$(DIVC item,
23-
$(H4 $(LINK2 $(ROOT_DIR)d-floating-point.html, Floating Point))
23+
$(H4 $(LINK2 $(ROOT_DIR)articles/d-floating-point.html, Floating Point))
2424
$(P Don Clugston goes into detail about floating point
2525
numbers in D and the pitfalls one may encounter.)
2626
)
2727
$(DIVC item,
28-
$(H4 $(LINK2 $(ROOT_DIR)warnings.html, Warnings))
28+
$(H4 $(LINK2 $(ROOT_DIR)articles/warnings.html, Warnings))
2929
$(P This is about compiler warnings in general, and dmd's
3030
warnings in particular.)
3131
)
3232
)
3333
$(DIVC row,
3434
$(DIVC item,
35-
$(H4 $(LINK2 $(ROOT_DIR)rationale.html, Rationale))
35+
$(H4 $(LINK2 $(ROOT_DIR)articles/rationale.html, Rationale))
3636
$(P Questions about the reasons for various design decisions for
3737
D often come up. This addresses many of them.)
3838
)
3939
$(DIVC item,
40-
$(H4 $(LINK2 $(ROOT_DIR)builtin.html, Builtin Rationale))
40+
$(H4 $(LINK2 $(ROOT_DIR)articles/builtin.html, Builtin Rationale))
4141
$(P D offers several capabilities built in to the core language
4242
that are implemented as libraries in other languages. This
4343
article answers why.)
4444
)
4545
)
4646
$(DIVC row,
4747
$(DIVC item,
48-
$(H4 $(LINK2 $(ROOT_DIR)ctod.html, C to D))
48+
$(H4 $(LINK2 $(ROOT_DIR)articles/ctod.html, C to D))
4949
$(P Coming from C? Here are various examples comparing $(I the D
5050
way) to $(I the C way).)
5151
)
5252
$(DIVC item,
53-
$(H4 $(LINK2 $(ROOT_DIR)cpptod.html, C++ to D))
53+
$(H4 $(LINK2 $(ROOT_DIR)articles/cpptod.html, C++ to D))
5454
$(P Coming from C++? Here are various examples comparing $(I the
5555
D way) to $(I the C++ way).)
5656
)
5757
)
5858
$(DIVC row,
5959
$(DIVC item,
60-
$(H4 $(LINK2 $(ROOT_DIR)pretod.html, C Preprocessor vs D))
60+
$(H4 $(LINK2 $(ROOT_DIR)articles/pretod.html, C Preprocessor vs D))
6161
$(P D doesn't have a preprocessor. This article shows how to do
6262
in D what would be a task for the preprocessor in C.)
6363
)
6464
$(DIVC item,
65-
$(H4 $(LINK2 $(ROOT_DIR)code_coverage.html, Code coverage analysis))
65+
$(H4 $(LINK2 $(ROOT_DIR)articles/code_coverage.html, Code coverage analysis))
6666
$(P D compilers come with a builtin code coverage analyzer.
6767
This article explains why and how to use it.)
6868
)
6969
)
7070
$(DIVC row,
7171
$(DIVC item,
72-
$(H4 $(LINK2 $(ROOT_DIR)exception-safe.html, Exception Safety))
72+
$(H4 $(LINK2 $(ROOT_DIR)articles/exception-safe.html, Exception Safety))
7373
$(P This article is about exceptions and how RAII and scope
7474
guard statements relate to them.)
7575
)
7676
$(DIVC item,
77-
$(H4 $(LINK2 $(ROOT_DIR)hijack.html, Hijacking))
77+
$(H4 $(LINK2 $(ROOT_DIR)articles/hijack.html, Hijacking))
7878
$(P Function hijacking is when old code accidentally calls
7979
a newly added or changed function because it shadows the
8080
intended one. This article is about how D prevents
@@ -83,53 +83,53 @@ $(D_S Articles,
8383
)
8484
$(DIVC row,
8585
$(DIVC item,
86-
$(H4 $(LINK2 $(ROOT_DIR)intro-to-datetime.html, Introduction to
86+
$(H4 $(LINK2 $(ROOT_DIR)articles/intro-to-datetime.html, Introduction to
8787
std.datetime))
8888
$(P Jonathan M Davis presents $(D std.datetime) which was added
8989
in version 2.052 (Jul 10, 2011), and compares it to the
9090
superseded $(D std.date).)
9191
)
9292
$(DIVC item,
93-
$(H4 $(LINK2 $(ROOT_DIR)lazy-evaluation.html, Lazy Evaluation))
93+
$(H4 $(LINK2 $(ROOT_DIR)articles/lazy-evaluation.html, Lazy Evaluation))
9494
$(P Walter Bright goes into the details of lazy parameters in
9595
D.)
9696
)
9797
)
9898
$(DIVC row,
9999
$(DIVC item,
100-
$(H4 $(LINK2 $(ROOT_DIR)migrate-to-shared.html, Migrating to Shared))
100+
$(H4 $(LINK2 $(ROOT_DIR)articles/migrate-to-shared.html, Migrating to Shared))
101101
$(P Since version 2.030 (May 11, 2009) D uses thread local
102102
storage (TLS) by default for static and global variables.
103103
The article shows the alternatives to TLS that are available
104104
in D.)
105105
)
106106
$(DIVC item,
107-
$(H4 $(LINK2 $(ROOT_DIR)mixin.html, Mixins))
107+
$(H4 $(LINK2 $(ROOT_DIR)articles/mixin.html, Mixins))
108108
$(P A short article about D's $(D mixin) statement which allows
109109
to insert arbitrary code from a string, and how it compares
110110
to the C preprocessor.)
111111
)
112112
)
113113
$(DIVC row,
114114
$(DIVC item,
115-
$(H4 $(LINK2 $(ROOT_DIR)regular-expression.html, Regular Expressions))
115+
$(H4 $(LINK2 $(ROOT_DIR)articles/regular-expression.html, Regular Expressions))
116116
$(P Dmitry Olshansky shows how to use regular expressions in D
117117
with $(D std.regex).)
118118
)
119119
$(DIVC item,
120-
$(H4 $(LINK2 $(ROOT_DIR)safed.html, SafeD))
120+
$(H4 $(LINK2 $(ROOT_DIR)articles/safed.html, SafeD))
121121
$(P Bartosz Milewski writes about SafeD, the memory-safe
122122
subset of D.)
123123
)
124124
)
125125
$(DIVC row,
126126
$(DIVC item,
127-
$(H4 $(LINK2 $(ROOT_DIR)templates-revisited.html, Templates Revisited))
127+
$(H4 $(LINK2 $(ROOT_DIR)articles/templates-revisited.html, Templates Revisited))
128128
$(P Walter Bright writes about how D improves upon C++
129129
templates.)
130130
)
131131
$(DIVC item,
132-
$(H4 $(LINK2 $(ROOT_DIR)ctarguments.html, Compile-time Argument
132+
$(H4 $(LINK2 $(ROOT_DIR)articles/ctarguments.html, Compile-time Argument
133133
Lists))
134134
$(P A compile-time list is a list of compile-time entities -
135135
types, symbols (names) and expressions (values). This
@@ -138,13 +138,13 @@ $(D_S Articles,
138138
)
139139
$(DIVC row,
140140
$(DIVC item,
141-
$(H4 $(LINK2 $(ROOT_DIR)variadic-function-templates.html,
141+
$(H4 $(LINK2 $(ROOT_DIR)articles/variadic-function-templates.html,
142142
Variadic Templates))
143143
$(P This article is about the D idiom of implementing variadic
144144
functions with variadic templates.)
145145
)
146146
$(DIVC item,
147-
$(H4 $(LINK2 $(ROOT_DIR)d-array-article.html, D Slices))
147+
$(H4 $(LINK2 $(ROOT_DIR)articles/d-array-article.html, D Slices))
148148
$(P Steven Schveighoffer writes about slices and dynamic arrays
149149
in D. Unfortunately, this article uses slightly different
150150
terminology than the language reference: What the article

dlang.org.ddoc

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -451,30 +451,30 @@ _=
451451
SUBNAV=
452452
SUBNAV_ARTICLES=
453453
$(SUBNAV_TEMPLATE
454-
$(SUBNAV_HEAD Articles, $(ROOT_DIR)articles.html, overview)
454+
$(SUBNAV_HEAD Articles, $(ROOT_DIR)articles/index.html, overview)
455455
$(UL $(SUBMENU2
456-
$(ROOT_DIR)faq.html, FAQ,
457-
$(ROOT_DIR)const-faq.html, const(FAQ),
458-
$(ROOT_DIR)d-floating-point.html, Floating Point,
459-
$(ROOT_DIR)warnings.html, Warnings,
460-
$(ROOT_DIR)rationale.html, Rationale,
461-
$(ROOT_DIR)builtin.html, Builtin Rationale,
462-
$(ROOT_DIR)ctod.html, C to D,
463-
$(ROOT_DIR)cpptod.html, C++ to D,
464-
$(ROOT_DIR)pretod.html, C Preprocessor vs D,
465-
$(ROOT_DIR)code_coverage.html, Code coverage analysis,
466-
$(ROOT_DIR)exception-safe.html, Exception Safety,
467-
$(ROOT_DIR)hijack.html, Hijacking,
468-
$(ROOT_DIR)intro-to-datetime.html, Introduction to std.datetime,
469-
$(ROOT_DIR)lazy-evaluation.html, Lazy Evaluation,
470-
$(ROOT_DIR)migrate-to-shared.html, Migrating to Shared,
471-
$(ROOT_DIR)mixin.html, Mixins,
472-
$(ROOT_DIR)regular-expression.html, Regular Expressions,
473-
$(ROOT_DIR)safed.html, SafeD,
474-
$(ROOT_DIR)templates-revisited.html, Templates Revisited,
475-
$(ROOT_DIR)ctarguments.html, Compile-time Argument Lists,
476-
$(ROOT_DIR)variadic-function-templates.html, Variadic Templates,
477-
$(ROOT_DIR)d-array-article.html, D Slices
456+
$(ROOT_DIR)articles/faq.html, FAQ,
457+
$(ROOT_DIR)articles/const-faq.html, const(FAQ),
458+
$(ROOT_DIR)articles/d-floating-point.html, Floating Point,
459+
$(ROOT_DIR)articles/warnings.html, Warnings,
460+
$(ROOT_DIR)articles/rationale.html, Rationale,
461+
$(ROOT_DIR)articles/builtin.html, Builtin Rationale,
462+
$(ROOT_DIR)articles/ctod.html, C to D,
463+
$(ROOT_DIR)articles/cpptod.html, C++ to D,
464+
$(ROOT_DIR)articles/pretod.html, C Preprocessor vs D,
465+
$(ROOT_DIR)articles/code_coverage.html, Code coverage analysis,
466+
$(ROOT_DIR)articles/exception-safe.html, Exception Safety,
467+
$(ROOT_DIR)articles/hijack.html, Hijacking,
468+
$(ROOT_DIR)articles/intro-to-datetime.html, Introduction to std.datetime,
469+
$(ROOT_DIR)articles/lazy-evaluation.html, Lazy Evaluation,
470+
$(ROOT_DIR)articles/migrate-to-shared.html, Migrating to Shared,
471+
$(ROOT_DIR)articles/mixin.html, Mixins,
472+
$(ROOT_DIR)articles/regular-expression.html, Regular Expressions,
473+
$(ROOT_DIR)articles/safed.html, SafeD,
474+
$(ROOT_DIR)articles/templates-revisited.html, Templates Revisited,
475+
$(ROOT_DIR)articles/ctarguments.html, Compile-time Argument Lists,
476+
$(ROOT_DIR)articles/variadic-function-templates.html, Variadic Templates,
477+
$(ROOT_DIR)articles/d-array-article.html, D Slices
478478
))
479479
)
480480
SUBNAV_FOUNDATION=

posix.mak

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -352,18 +352,20 @@ MAN_PAGE=docs/man/man1/dmd.1
352352
# and .html in the generated HTML. Save for the expansion of
353353
# $(SPEC_ROOT), the list is sorted alphabetically.
354354
PAGES_ROOT=$(SPEC_ROOT) 404 acknowledgements areas-of-d-usage \
355-
articles ascii-table bugstats builtin \
356-
$(CHANGELOG_FILES) code_coverage community comparison concepts \
357-
const-faq cppcontracts cpptod ctarguments ctod \
358-
D1toD2 d-array-article d-floating-point deprecate dll-linux dmd \
355+
ascii-table bugstats builtin $(CHANGELOG_FILES) community comparison concepts \
356+
cppcontracts D1toD2 deprecate dll-linux dmd \
359357
dmd-freebsd dmd-linux dmd-osx dmd-windows documentation download dstyle \
360-
exception-safe faq forum-template gpg_keys glossary \
361-
gsoc2011 gsoc2012 gsoc2012-template hijack howto-promote htod index install \
362-
intro-to-datetime lazy-evaluation menu migrate-to-shared mixin \
363-
orgs-using-d overview pretod rationale rdmd regular-expression resources safed \
364-
search template-comparison templates-revisited tuple \
365-
variadic-function-templates warnings wc windbg \
358+
forum-template gpg_keys glossary \
359+
gsoc2011 gsoc2012 gsoc2012-template howto-promote htod index install \
360+
menu mixin orgs-using-d overview rationale rdmd resources \
361+
search template-comparison tuple wc windbg \
366362
$(addprefix foundation/, index about donate sponsors upb-scholarship)
363+
$(addprefix articles/, index.dd builtin.dd code_coverage.dd const-faq.dd
364+
cpptod.dd ctarguments.dd ctod.dd d-array-article.dd d-floating-point.dd \
365+
exception-safe.dd faq.dd hijack.dd intro-to-datetime.dd lazy-evaluation.dd \
366+
migrate-to-shared.dd mixin.dd pretod.dd rationale.dd regular-expression.dd \
367+
safed.dd templates-revisited.dd variadic-function-templates.dd warnings.dd \
368+
)
367369

368370
# The contributors listing is dynamically generated
369371
ifneq (1,$(DIFFABLE))

0 commit comments

Comments
 (0)