这是indexloc提供的服务,不要输入任何密码
Skip to content

creativecommons/vocabulary-theme

Repository files navigation

vocabulary-theme

WordPress Theme implementation of the Vocabulary design system (creativecommons/vocabulary).

Code of conduct

CODE_OF_CONDUCT.md:

The Creative Commons team is committed to fostering a welcoming community. This project and all other Creative Commons open source projects are governed by our Code of Conduct. Please report unacceptable behavior to conduct@creativecommons.org per our reporting guidelines.

Contributing

See CONTRIBUTING.md.

Development

The theme development work should be done within the src/ directory.

Setup

  1. Create the .env file:
    cp .env.example .env
  2. Update .env to set desired values for variables (WP_VERSION, WP_MOD_TYPE, WP_MOD_NAME, etc.)
  3. Build/start Docker:
    docker compose up
  4. Wait for build and initialization to complete
  5. Install WordPress initially through the GUI (localhost:8080)
    • TODO: automate this step

Shortcodes

The theme comes with a custom [list] shortcode for displaying a list of queried objects that builds from a simplified WP Query obj

The shortcode operates as follows:


[list cat="category" tag="tag,tag,tag" type="post" limit="10" sort="ASC" sortby="date" template="blog_posts"]

The most minimal usecase:


[list]

The defaults are as follows:

  • category:
  • tag:
  • type: post
  • limit: 5
  • sort: ASC
  • sortby: date
  • template: default

The template can be set to a custom partial, loaded from the shortcode-templates folder, if no template is set, it will instead display as the default template (a bulleted list of links)

The arguments accept the counterpart values from the subset of args in the WPQuery Class. This means that the category and tag arguments can be a single or comma separate list of values. sort maps to order and sortby maps to orderby for some beneficial UX for endusers to be more clear in purpose.

Docker containers

The docker-compose.yml file defines the following containers:

  1. vocabtheme-wordpress-web (localhost:8080)
  2. vocabtheme-wordpress-db
  3. vocabtheme-composer
  4. vocabtheme-phpmyadmin (localhost:8003)
  5. vocabtheme-wpcli

Releases

See scripts/README.md.

Cache warning

⚠️ WARNING: This theme does not currently contain any dynamic content (any user-specific content). The addition of dynamic content must be coordinated with the content delivery network (CDN) page rules that govern what is cached.

Currently, the theme's output of pages is completely deterministic. Any given page rendered now, will be identical to the same page rendered 30 minutes later (assuming the theme is the same version). This allows for very simple CDN page rules (ex. Caching Static HTML with WordPressWooCommerce · Cloudflare Support docs).

Copyright and trademarks

CC Badge, Icons, Images, and Logos

Code

Vocabulary Theme code is licensed under the GNU General Public License v2.0 or later.

Vocabulary

CC0 1.0 Universal (CC0 1.0) Public Domain Dedication button

COPYING: All the code within Vocabulary is dedicated to the public domain under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.

Normalize.css

normalize.css is licensed under the Expat/MIT License.

Fonts

CC Accidenz Commons

CC Accidenz Commons by Archetypo is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License.

JetBrains Mono

JetBrains Mono is licensed under the OFL-1.1 License.

Roboto Condensed

Roboto Condensed by Christian Robertson is licensed under the Apache License, Version 2.0.

Source Sans Pro

Source Sans Pro by Paul D. Hunt is licensed under the Open Font License.

Vocabulary Icons

Vocabulary Icons use icons from Font Awesome which are licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License.

About

WordPress Theme implementation of the Vocabulary design system

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors 4

  •  
  •  
  •  
  •