jazzy icon indicating copy to clipboard operation
jazzy copied to clipboard

Add configuration to drop certain callouts depending on the access level setting

Open reitzig opened this issue 7 years ago • 2 comments

I don't necessarily want information like author and date of symbols in public documentation.

Therefore, I'd need to tell Jazzy to just drop - Author: and - Date: callouts unless --min-acl internal (or lower).

reitzig avatar Apr 24 '17 15:04 reitzig

Right now I think the best way for you to do this is via css: take a copy of whichever theme you are using and add a "display: none" rule for "aside-author" & "aside-date", give jazzy --theme.

(unless you care that the author details etc will be in the html!)

johnfairh avatar Apr 25 '17 09:04 johnfairh

I implemented this workaround in the Bash script I use to call Jazzy (the XCode build script):

declare -a asidesToDrop=("date" "since" "author")
# Can depend on parameters such as build configuration.

asides=""
for aside in "${asidesToDrop[@]}"; do
    asides="${asides}div.aside-${aside}, "
done
# Note: ${v/%Pattern/Replacement} replaces a suffix matching Pattern.
#       Here, we want to remove trailing ", " if present.
echo "${asides/%??/} { display: none; }" >> /path/to/doc/css/jazzy.css

reitzig avatar Apr 26 '17 09:04 reitzig