Creative Commons License Test
This post is designed to test the Creative Commons license functionality in the sidebar and ensure the license image URLs are constructed correctly. Auto-extracted description demonstrates the feature.
Creative Commons License Test
License Types Supported
The XenT theme should support all standard Creative Commons license types:
Available License Types
- by: Attribution
- by-nc: Attribution-NonCommercial
- by-nc-nd: Attribution-NonCommercial-NoDerivatives
- by-nc-sa: Attribution-NonCommercial-ShareAlike (currently configured)
- by-nd: Attribution-NoDerivatives
- by-sa: Attribution-ShareAlike
- zero: CC0 Public Domain Dedication
Expected Behavior
When Creative Commons is enabled in the configuration with sidebar: true, the sidebar should display:
- License Image: Correctly constructed URL from the license type
- License Link: Links to the appropriate Creative Commons license page
- Proper Attribution: Schema.org microdata with
itemprop="license"
Current Configuration
Based on the site configuration, this should display:
- License Type:
by-nc-sa(Attribution-NonCommercial-ShareAlike) - Image URL:
https://mirrors.creativecommons.org/presskit/buttons/80x15/svg/by-nc-sa.svg - License URL:
https://creativecommons.org/licenses/by-nc-sa/4.0/
URL Construction Logic
The URLs should be constructed as follows:
// License page URL
const ccUrl = `https://creativecommons.org/licenses/${ccLicense}/4.0/`;
// License image URL
const ccImageUrl = `https://mirrors.creativecommons.org/presskit/buttons/80x15/svg/${ccLicense}.svg`;
Validation Points
To verify the Creative Commons implementation:
- Image Display: The CC license image should appear in the sidebar
- Correct Image: Should show the by-nc-sa badge specifically
- Working Link: Clicking should open the CC license page
- New Tab: Should open in a new tab with proper attributes
- Schema Markup: Should include proper schema.org microdata
License Information
This content is provided under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License as configured in the theme settings.
Implementation Notes
The Creative Commons license display:
- Uses object presence instead of
.enableflags (following XenT architecture rules) - Constructs URLs dynamically based on license type
- Maintains pixel-perfect reproduction of NexT theme behavior
- Includes proper accessibility and SEO attributes
Testing Checklist
- CC license image appears in sidebar
- Image shows correct license type (by-nc-sa)
- Link opens correct CC license page
- Opens in new tab
- Includes proper CSS classes and schema markup
- No broken image or 404 errors
- Responsive behavior on all devices