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

Support for stories #21

Closed
mirkobrombin opened this issue Feb 18, 2024 · 2 comments
Closed

Support for stories #21

mirkobrombin opened this issue Feb 18, 2024 · 2 comments
Assignees
Milestone

Comments

@mirkobrombin
Copy link
Member

mirkobrombin commented Feb 18, 2024

A story in Chronos is a collection of articles that should be read in a specific order. The idea is to add a new key in the article header:

..
story: my-first-story
..

then adding a new stories.yml in each articles directory (for each language), with the following format:

- id: my-first-story
  name: My First Story
  description: See how cool is my first story
  chapters:
    - name: my-first-article-file-name
      order: 0
      showsInIndex: true
    - name: my-second-article-file-name
      order: 1
      showsInIndex: false

The showsInIndex key will be used by Chronos to avoid listing articles that must only show in the story.

Chronos then will use that to provide one new key in each article response:

 {
    "Story": {
        "Id": "my-first-story",
        "Name": "My FIrst Story",
        "Description": "See how cool is my first story",
        "Previous": "",
        "Next": "my-second-article-slug"
    }
}

the client can then use this information to manage navigation between story chapters.

There will be also a new :repoId:/stories endpoint to return all the stories in the collection.

@kbdharun
Copy link
Member

LGTM, we could maybe show these stories separately in the frontend (related: Vanilla-OS/chronos-frontend#35).

@mirkobrombin
Copy link
Member Author

Actual implementation only requires the stories.yml file in the articles' root directory:

- id: testing
  name: My First Story
  description: See how cool is my first story

and add the story references in each article:

---
StoryId: testing
Previous: ""
Next: "test2"
Listed: true
Title: Test
Description: Test
PublicationDate: 2023-08-29
Authors:
  - Vanilla-OS
Tags:
  - test
---

test

the stories feature and all its values are optional and per repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants