Skip to content

Conversation

wilzbach
Copy link
Contributor

With the DDoc wrapper it's now pretty easy to do cool things without big Makefile hacks.
This PR now uses the Ddoc wrapper for all Ddoc pages and as a motivation starts to add HEADERNAV to a few pages.

@wilzbach wilzbach requested a review from acehreli as a code owner January 10, 2018 13:38
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@CyberShadow
Copy link
Member

FYI tests failing (undefined macros).

@wilzbach
Copy link
Contributor Author

wilzbach commented Jan 11, 2018

FYI tests failing (undefined macros).

Hehe I'm so glad we added this sanity check :)
(it's passing now)
Seems like the stdin trick, leads to SRCFILENAME being defined to __stdin by default:

diff --git a/web/ascii-table.html b/web/ascii-table.html
index 5158ca7..0f8e962 100644
--- a/web/ascii-table.html
+++ b/web/ascii-table.html
@@ -89,7 +89,7 @@
 		<div >			If you spot a problem with this page, click here to create a Bugzilla issue.
 		</div>
 	</div>
-	<div class="tip smallprint">		<a href="https://github.com/dlang/dlang.org/edit/master/ascii-table.dd">Improve this page</a>
+	<div class="tip smallprint">		<a href="https://github.com/dlang/dlang.org/edit/master/__stdin.d">Improve this page</a>
 		<div >			Quickly fork, edit online, and submit a pull request for this page.
 			Requires a signed-in GitHub account. This works well for small changes.
 			If you'd like to make larger changes you may want to consider using

I added a quick commit to test how easy it would be to inject "dynamic" macros with a simple trick. I really want to avoid re-implementing Ddoc.

@wilzbach wilzbach force-pushed the ddoc-wrapper2 branch 2 times, most recently from 3ea25f4 to 933dde9 Compare January 12, 2018 11:27
@wilzbach
Copy link
Contributor Author

@CyberShadow or others: This is ready now.
I also fixed a bug I introduced when generating the spec header:

diff --git a/web/spec/property.html b/web/spec/property.html
index 19d2881..f2d8017 100644
--- a/web/spec/property.html
+++ b/web/spec/property.html
@@ -94,7 +94,7 @@
 		<div >			If you spot a problem with this page, click here to create a Bugzilla issue.
 		</div>
 	</div>
-	<div class="tip smallprint">		<a href="https://github.com/dlang/dlang.org/edit/master/__stdin.d">Improve this page</a>
+	<div class="tip smallprint">		<a href="https://github.com/dlang/dlang.org/edit/master/spec/property.dd">Improve this page</a>
 		<div >			Quickly fork, edit online, and submit a pull request for this page.
 			Requires a signed-in GitHub account. This works well for small changes.
 			If you'd like to make larger changes you may want to consider using

@wilzbach
Copy link
Contributor Author

So this fixes the "Improve this page" link for all spec pages and - even though it changes a couple of pages - it is pretty trivial. However, if the number if changes is a problem I can also split them of into a separate PR.

@wilzbach
Copy link
Contributor Author

Rebasing this gets tedious - any reason for not moving forward with this?

@wilzbach
Copy link
Contributor Author

(another rebase)

@andralex andralex merged commit 99eb406 into dlang:master Jan 18, 2018
@wilzbach wilzbach deleted the ddoc-wrapper2 branch July 18, 2018 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants