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

feat: site with mdbook #170

Merged
merged 27 commits into from
Jul 19, 2024
Merged

feat: site with mdbook #170

merged 27 commits into from
Jul 19, 2024

Conversation

jcstein
Copy link
Member

@jcstein jcstein commented Jul 18, 2024

Overview

TODO

  • set up mdbook with same file structure (i.e. /cips stays, becomes default src dir, and /wgs move to /cips/wgs)
  • custom handling for frontmatter in CIPs, use option 2 from here feat: site with mdbook #170 (comment)
  • set up dns
  • test out on personal github pages https://cips.jcstein.dev
  • prep for plausible
    • add plausible script
  • favicon
  • prep site for dns

The previous PR got too messy and I'd like to try without moving the structure around. #168

@jcstein jcstein changed the title feat: init mdbook minimially destructive for repo structure feat: site with mdbook Jul 18, 2024
@jcstein jcstein added the enhancement New feature or request label Jul 18, 2024
@jcstein
Copy link
Member Author

jcstein commented Jul 19, 2024

Options for frontmatter:

1. change the styling to have backticks around it and display the code block

Screenshot 2024-07-19 at 1 54 22 PM

this also works on github
Screenshot 2024-07-19 at 1 59 10 PM

2. change the style of the frontmatter itself to be .md-friendly instead of github-flavored-markdown friendly

IMHO this looks worse
Screenshot 2024-07-19 at 2 00 29 PM

3. use GFM-styled table

cip title author status type created
1 Celestia Improvement Proposal Process and Guidelines Yaz Khoury [email protected] Living Meta 2023-04-13
Screenshot 2024-07-19 at 2 03 39 PM

@jcstein
Copy link
Member Author

jcstein commented Jul 19, 2024

edge case for option 3 is that you can't see the whole table
Screenshot 2024-07-19 at 2 08 31 PM

but if it is a code block, you can. no scrolling
Screenshot 2024-07-19 at 2 09 14 PM

jcstein added 2 commits July 19, 2024 14:14
fix: linting

fix: resolve conflicts

fix: add cip: 23 to frontmatter

fix: conflicts
@jcstein
Copy link
Member Author

jcstein commented Jul 19, 2024

i'm actually not sure what's best here 😅
it's pretty janky to scroll through the code block
Screenshot 2024-07-19 at 2 49 11 PM

@jcstein jcstein marked this pull request as ready for review July 19, 2024 19:07
@jcstein
Copy link
Member Author

jcstein commented Jul 19, 2024

demo: https://cips.jcstein.dev/
diff for final touches: jcs/add-site-v0...jcstein:CIPs:main

once this is approved, 2 things will need to happen before going live:

  1. @sysrex to add DNS for cips.celestia.org for github pages deployment. this should just be adding a CNAME entry for "cips" since gh pages is already setup for the A records of celestia.org
  2. @musalbas to begin collecting plausible analytics. it's already set up on the site's end
    <script defer data-domain="cips.celestia.org" src="https://plausible.celestia.org/js/plausible.js"></script>

Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, thanks for all your hard work on this!

.github/workflows/mdbook.yml Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
.markdownlint.yaml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
cips/cip-1.md Outdated Show resolved Hide resolved
@musalbas
Copy link
Member

musalbas commented Jul 19, 2024

GFM style tables look very annoying to edit for CIP authors and look worse rendered to me. Why do you think it looks worse than option 2?

@jcstein
Copy link
Member Author

jcstein commented Jul 19, 2024

I think options 2 and 3 are equally as annoying to edit/author and neither is perfect. GFM just fits into the current style that is displayed on github

@musalbas
Copy link
Member

musalbas commented Jul 19, 2024

I don't follow how, as option 2 just requires the author to write bulletpoints whereas option 3 requires them to add a bunch of ------ ascii art and scroll right to see the whole text, and disable text wrap

@jcstein
Copy link
Member Author

jcstein commented Jul 19, 2024

I see, the table for option 2 is easier to edit. i will demo on this PR

| cip | 1 |
| - | - |
| title | Celestia Improvement Proposal Process and Guidelines |
| author | Yaz Khoury <[email protected]> |
| status | Living |
| type | Meta |
| created | 2023-04-13 |

renders:

cip 1
title Celestia Improvement Proposal Process and Guidelines
author Yaz Khoury [email protected]
status Living
type Meta
created 2023-04-13

@jcstein jcstein merged commit 49b0adc into main Jul 19, 2024
2 checks passed
@jcstein jcstein deleted the jcs/add-site-v0 branch July 19, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants