Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/book/build
/book/src/api
/book/src/api.md
/book/src/authoring-metadata.md
/book/src/commands
/book/src/commands.md
/book/src/content-types.md
Expand All @@ -14,6 +13,7 @@
/book/src/languages.md
/book/src/lints.md
/book/src/media-formats.md
/book/src/metadata.md
/book/src/unstable-features.md
/book/src/web
/book/src/web.md
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ filepack create [DIRECTORY]
Which will validate metadata if present and write it to `metadata.filemeta`, as
well as include it in `manifest.filepack`.

See [the book](https://filepack.com/book/authoring-metadata.html) for more
information.
See [the book](https://filepack.com/book/metadata.html) for more information.

### Signing a Package

Expand Down
2 changes: 1 addition & 1 deletion book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Summary
# Guide
- [Packages](packages.md)
- [Configuration](configuration.md)
- [Authoring Metadata](authoring-metadata.md)
- [Server](server.md)

# Background
Expand Down Expand Up @@ -160,6 +159,7 @@ Summary
- [Languages](languages.md)
- [Lints](lints.md)
- [Media Formats](media-formats.md)
- [Metadata](metadata.md)
- [Tagged Hex](hex.md)
- [hash](hex/hash.md)
- [package](hex/package.md)
Expand Down
6 changes: 3 additions & 3 deletions book/src/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ covering a variety of media types. All metadata served by the demo server,
including package artwork, video placeholders, thumbnail images, and media
information, is sourced from package metadata.

See [Metadata](deco/metadata.md) for the deco schema and [Authoring
Metadata](authoring-metadata.md) for a description of `metadata.yaml`, the
template file used to generate package metadata.
See [Metadata](metadata.md) for an example `metadata.yaml` file, the template
used to generate package metadata, as well as links to the deco and YAML
metadata schemas.

Please feel free to [open an issue](https://github.com/casey/filepack/issues)
with ideas for new metadata fields.
2 changes: 1 addition & 1 deletion book/src/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ filepack metadata
```

The metadata schema is extensive, with many fields and media types. See
[Authoring Metadata](authoring-metadata.md) for more information.
[Metadata](metadata.md) for more information.

Linting Packages
----------------
Expand Down
16 changes: 8 additions & 8 deletions crates/generate/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use {
functions::{escape, list, path_parameter_type, route_link, route_path, write},
row::Row,
templates::{
ApiMd, AuthoringMetadataMd, CommandMd, CommandsMd, ContentTypesMd, DecoMd, DecoSchemaMd,
HexMd, JsonMd, JsonSchemaMd, LanguagesMd, LintsMd, MediaFormatsMd, RouteMd, SummaryMd, TagMd,
ApiMd, CommandMd, CommandsMd, ContentTypesMd, DecoMd, DecoSchemaMd, HexMd, JsonMd,
JsonSchemaMd, LanguagesMd, LintsMd, MediaFormatsMd, MetadataMd, RouteMd, SummaryMd, TagMd,
UnstableFeaturesMd, WebMd, YamlMd,
},
},
Expand Down Expand Up @@ -263,16 +263,16 @@ fn main() {
);

write(
"authoring-metadata.md",
AuthoringMetadataMd {
example: &reference.metadata,
"media-formats.md",
MediaFormatsMd {
media_formats: &reference.media_formats,
},
);

write(
"media-formats.md",
MediaFormatsMd {
media_formats: &reference.media_formats,
"metadata.md",
MetadataMd {
example: &reference.metadata,
},
);

Expand Down
10 changes: 5 additions & 5 deletions crates/generate/src/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ pub(crate) struct ApiMd<'a> {
pub(crate) routes: &'a BTreeMap<String, Route>,
}

#[derive(Boilerplate)]
pub(crate) struct AuthoringMetadataMd<'a> {
pub(crate) example: &'a yaml::Example,
}

#[derive(Boilerplate)]
pub(crate) struct CommandMd<'a> {
pub(crate) help: &'a str,
Expand Down Expand Up @@ -98,6 +93,11 @@ pub(crate) struct MediaFormatsMd<'a> {
pub(crate) media_formats: &'a BTreeMap<MediaType, Vec<MediaFormat>>,
}

#[derive(Boilerplate)]
pub(crate) struct MetadataMd<'a> {
pub(crate) example: &'a yaml::Example,
}

#[derive(Boilerplate)]
pub(crate) struct RouteMd<'a> {
pub(crate) path: &'a str,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Authoring Metadata
==================
Metadata
========

Filepack packages may contain metadata describing the package in
`metadata.filemeta`. This metadata is stored as [deco](deco.md), which is not
Expand Down
2 changes: 1 addition & 1 deletion crates/generate/templates/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Summary
# Guide
- [Packages](packages.md)
- [Configuration](configuration.md)
- [Authoring Metadata](authoring-metadata.md)
- [Server](server.md)

# Background
Expand Down Expand Up @@ -39,6 +38,7 @@ Summary
- [Languages](languages.md)
- [Lints](lints.md)
- [Media Formats](media-formats.md)
- [Metadata](metadata.md)
- [Tagged Hex](hex.md)
%% for (tag, path) in &self.hex {
- [{{ tag }}]({{ path }})
Expand Down
2 changes: 1 addition & 1 deletion crates/generate/templates/yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ YAML
====

Filepack uses YAML for hand-authored files, namely
[metadata](authoring-metadata.md).
[`metadata.yaml`](metadata.md).

This chapter includes the schemas of all types with YAML representations.

Expand Down
Loading