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

Open
mirkobrombin opened this issue Feb 18, 2024 · 1 comment
Open

Support for stories #21

mirkobrombin opened this issue Feb 18, 2024 · 1 comment
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).

@kbdharun kbdharun added this to the orchid-stable milestone Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants