Skip to content

akingdom/pykeletFromComment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulling data from an HTML comment

A Pykelet front matter block is essentially the same as that of a YAML Jekyll/Hugo front matter block except that we encase it in an HTML comment <!-- ... --> rather than YAML ---...---

The aim is to be able to pull information from a source-code style comment. This is not intended for SEO purposes (comments are generally no longer indexed by search bots), so such data should still be put in the header if required.

Example

This HTML comment is extracted and then for example purposes, displays it as...

<!--PYKELET
  FILENAME:    example.html
  DESCRIPTION: This is a demonstration HTML file showing metadata extraction.
  AUTHOR:      Andrew Kingdom
  LICENSE:     MIT (3-clause BSD)
  -->

into this...

Hello World

This is a demonstration of extracting and displaying metadata from HTML comments.

PYKELET:
FILENAME: example.html
DESCRIPTION: This is a demonstration HTML file showing metadata extraction.
AUTHOR: Andrew Kingdom
LICENSE: MIT (3-clause BSD)

About

This demonstrates pulling metadata from a comment in the HTML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published