Skip to content

Conversation

@wilzbach
Copy link
Contributor

This adds a nice footer navigation to the specification documents:

image

I doubt that we need to update it in the near future, but if, I put the script to do so in the spec folder.
Also once this is in, further navigation updates will be easier, because the Ddoc maco string can be matched nicely.

@PetarKirov
Copy link
Member

Is there something like a master layout template, that we can use in order to avoid repetition?

@wilzbach
Copy link
Contributor Author

Is there something like a master layout template, that we can use in order to avoid repetition?

In Ddoc you only have macro expansion and a file doesn't know it's neighbors ... so there's unfortunately no other way than hard-coding it:
I added the duplicate definitions of the Macros to avoid undefined macro errors in the ePUB / Latex build, but I just realized that there's no need, e.g. from latex.ddoc:

DDOC_COMMENT=% $0
DDOC_UNDEFINED_MACRO = $(DDOC_COMMENT UNDEFINED MACRO: $1)

@dlang-bot dlang-bot merged commit d2e620d into dlang:master Jun 18, 2017
@CyberShadow
Copy link
Member

I think at some point we will want to consolidate all these little edits into a single program which post-processes the DDoc-generated HTML files.

@PetarKirov
Copy link
Member

I think at some point we will want to consolidate all these little edits into a single program which post-processes the DDoc-generated HTML files.

Also known as ddox :P

@CyberShadow
Copy link
Member

I realize you're probably joking, but to be pedantic - DDox does not post-process HTML files, it generates them directly from JSON. It also only deals with Phobos/Druntime, not the spec, website, or other formats like PDF/eBook. You may be thinking of Adam Ruppe's documentation generator, which does work by post-processing DDoc output.

@PetarKirov
Copy link
Member

PetarKirov commented Jun 18, 2017

To clarify, IMO the right way to implement those kinds of features is with diet templates in ddox. We do this already in dlang-tour - see https://github.com/dlang-tour/core/blob/master/views/tour.dt#L52.
Of course, I know that's easier said than done for dlang.org ;)
But I'm sure that the end result would be orders of magnitude more maintainable than adding even more feature creep to the make files, which would happen inevitably when we start adding post-processing steps.

@adamdruppe
Copy link
Contributor

adamdruppe commented Jun 18, 2017 via email

@PetarKirov
Copy link
Member

@adamdruppe are you using by any chance libdparse? If so, do you have anything that may be upstreamable?

@wilzbach wilzbach deleted the add-footer branch June 18, 2017 20:22
@adamdruppe
Copy link
Contributor

adamdruppe commented Jun 18, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants