racket / racket/scribble

add example of adding HTML tag to scribble output

Open
#241 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
250
Forks
102
Avg merge
11d 11h
Merged PRs (30d)
1

Description

I agree about the need for some kind of doc update. Outputting a specific HTML tag is a basic task and the answer is hard to find.

Maybe Scribble needs an FAQ, maybe we can get by with more indexing.

Originally posted by @bennn in https://github.com/racket/scribble/issues/233#issuecomment-636227679

tasks

  • Choose suitable locations for examples
  • choose suitable examples

Possible example (shows HTML tag nesting):

#lang scribble/base

@(require
   (only-in scribble/core make-style)
   (only-in scribble/html-properties alt-tag))

@(define details-style (make-style #f (list (alt-tag "details"))))
;summary
@(define summary-style (make-style #f (list (alt-tag "summary"))))

@(define (details summary . arg*)
   (apply elem (elem summary #:style summary-style) #:style details-style arg*))

@; -----------------------------------------------------------------------------

This is a Scribble document with a @tt{details} element.

@details["the details heading"]{
 The @tt{alt-tag} style property can change the HTML tag that
 Scribble creates for an @tt{element} or @tt{paragraph}.

@url{https://docs.racket-lang.org/scribble/core.html#(def._((lib._scribble%2Fhtml-properties..rkt)._alt-tag))}
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by reviewing the proposed Scribble example and the existing documentation locations, then choose suitable locations and examples that show HTML-tag output and nesting; done means both listed tasks are completed.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.