Various pieces of information would be valuable to have in themes to make the usage less ambiguous. For example which content sections, which section fields etc. are allowed. There also needs to be 2 seperate specifications, the first is for themes in theme folders/remotes (theme configuration), and the second is for themes when they are copied into a directory using ezcv -c <theme>
(instance configuration).
Requirements
Configurations
Example of dimension theme
name: dimension
ezcv_version: "0.3.0"
created: 2022-04-22
updated: 2022-04-22
folder: dimension # optional, only needed if folder is different than name field
sections: # optional (some themes have no sections)
education:
type: markdown
fields: # Optional
title: str
institution:
required: true
type: str
month_started: str
year_started: str
month_ended: str
year_ended: str
current: bool
gallery:
type: gallery
projects:
type: markdown
fields:
title:
required: true
type: str
image: image
link: str
volunteering_experience:
type: markdown
fields:
role:
required: true
type: str
company:
required: true
type: str
month_started: str
year_started: str
month_ended: str
year_ended: str
current: bool
work_experience:
type: markdown
fields:
role:
required: true
type: str
company:
required: true
type: str
month_started: str
year_started: str
month_ended: str
year_ended: str
current: bool
Formats
Datetime String
A regular string, but it must be in the format YYYY-MM-DD
, so for April 21st 2022 it would be 2022-04-21
Literals
You can define literals to state strings that must be one of a set number of options, for example if a field only be the strings "literal1" or "literal2" you can use a list format to denote this:
field_name:
- literal1
- literal2
So for example if you have the choice between the literals ["sophomore", "junior", "senior"] for the field level
it would be:
level:
- sophomore
- junior
- senior
Type indications
For fields within a section there is a type specifier to note the type for a field in the form of:
... # More stuff
sections:
section_name:
...
fields
field_name: type
section_name2:
...
fields
field_name: type
... # More stuff
So if there is a field called current
in education
section files it would look like
... # More stuff
sections:
education:
...
fields
current: bool
... # More stuff
Type indicators are:
bool
: Boolean values (True or False)
str
: string values (plain text)
dstring
: datetime string (string in the format of YYYY-MM-DD
)
literal
: literal (a set of strings see below for details)
int
: an integer (number)
float
: a floating point number (decimal number)
For literals you can use the following format
... # More stuff
sections:
education:
... # More stuff
fields
level:
- sophmore
- junior
- senior
... # More stuff
Required Fields
If a field is required you can denote it by adding a required: true
key-value pair to the field, otherwise it is assumed to be optional. For example:
... # More stuff
sections:
section_name:
folder_name: str
fields:
field_name:
type: str
required: true
section_name2:
folder_name: str
fields:
field_name: type
... # More stuff
Fields for instance configuration
- Theme Name: str
- Date Created: Datetime string
- Date Updated: Datetime string
- Acquisition Method: literal [source, first party, third party]
- This indicates how the theme was gotten
- Source = Included with ezcv (base, dimension)
- First Party = From Qu-up/ezcv-themes
- Third Party = Anywhere else
- Would include URL or path where it was attained from
- Sections (see below)
Sections info
... # More stuff
sections:
section_name:
folder_name: str
fields:
field_name:
type: str
required: true
section_name2:
folder_name: str
fields:
field_name: type
... # More stuff
Exceptions
Any exceptions to the above spec are noted below
Gallery
For the gallery since there is no additional fields only the folder_name
key is necessary/usable
... # More stuff
sections:
gallery:
folder_name: str
... # More stuff