Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide MARK:- #857

Open
drekka opened this issue Jul 17, 2017 · 5 comments
Open

Hide MARK:- #857

drekka opened this issue Jul 17, 2017 · 5 comments

Comments

@drekka
Copy link

drekka commented Jul 17, 2017

Is it possible to stop Jazzy from adding any MARK:- as subtitles in the generated html?

I used them quite extensively to help organise my methods, but I don't want them in the generated documentation.

@johnfairh
Copy link
Collaborator

johnfairh commented Jul 17, 2017

Nope, it's a feature that they're carried through. You could try hiding them via CSS - the section-name class is the one for those subtitles and task-name-container for the div around that.

edit: or take a copy of whichever theme you are using and edit that as you please, eg. taking out these parts.

@reitzig
Copy link

reitzig commented Jul 27, 2017

A way to hide obsolete MARKs would be great. Example:

class Foo {
	// MARK: Doing Stuff

	/// ...
	public func foo() { ... }

	// MARK: Helpers

	/// ...
	fileprivate func bar() { ... }
}

Now, both MARKs would show even though the second one quite obviously marks nothing.

Proposal: drop MARKs which are not followed by an actual documented symbol, but by EOF or another MARK.

Maybe this can be worked around with using CSS as well, but it sure is not immediate.

@reitzig
Copy link

reitzig commented Jul 27, 2017

Never mind, apparently Jazzy already does what I propose. :'D

@drekka
Copy link
Author

drekka commented Jul 31, 2017

I managed to hide the marks by adding my own css file and hiding them. Ugly but worked. I used this in my CSS:

div.task-name-container {
    display:none;
}
.main-content ul {
    margin-bottom:0;
} 

And then added this to my jazzy command:

--head '<link rel="stylesheet" type="text/css" href="files/My.css" /><link rel="stylesheet" type="text/css" href="../files/My.css" />'

Note that I had to add it twice using two different URLs. This solves the issue where CSS files are reference both in the root of the documentation and in subdirectories. If there is a better way of handling this, I'd like to know.

@reitzig
Copy link

reitzig commented Jul 31, 2017

@drekka Thanks for sharing! I already hack the CSS, but I for one don't want to hide all marks everywhere, but only those that don't make sense (cf. #780).

FWIW, I maintain my custom CSS in its own file, and do this after Jazzy has run:

cat doc/custom.css >> build/doc/css/jazzy.css

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

No branches or pull requests

3 participants