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

Some thoughts on RDFa #8

Closed
joepio opened this issue Jul 26, 2017 · 1 comment
Closed

Some thoughts on RDFa #8

joepio opened this issue Jul 26, 2017 · 1 comment

Comments

@joepio
Copy link
Contributor

joepio commented Jul 26, 2017

Since link-redux effectively converts RDF to HTML, the RDFa spec seems to be relevant. There are various ways link-redux could add RDFa properties to generated HTML.

  1. Wrap all resources and properties in div's that include all the relevant attributes, or add relevant RDFa attributes to elements.
  2. Add a helper function that developers could use to add to their own property / resource component. They could call this function in the top-level element, which adds the RDFa attributes.

What are your thoughts on this? Is adding RDFa attributes valuable?

@joepio
Copy link
Contributor Author

joepio commented Jun 7, 2019

Topology components are probably the right place to do this. We ended up adding a resource attribute with the subject property to our main Topology class, which other topologies extended.

  renderContent() {
    return this.wrap(subject => (
      <div
        className={this.getClassName()}
        resource={subject && subject.value}
        style={this.getStyle()}
      >
        {this.props.children}
      </div>
    ));
  }

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

1 participant