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: add website using vocs.dev #57

Closed
wants to merge 5 commits into from
Closed
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
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ Read [CIP-1](https://github.com/celestiaorg/CIPs/blob/main/cips/cip-1.md) for in
| 3 | January 24, 2024 | [Agenda](https://github.com/celestiaorg/CIPs/issues/40) | [Tweet Thread](https://x.com/JoshCStein/status/1750187535911837848?s=20) | [Recording](https://www.youtube.com/watch?v=g_8e3h6iixM) |
| 2 | December 13, 2023 | [Agenda](https://github.com/celestiaorg/CIPs/issues/22) | [Tweet Thread](https://x.com/JoshCStein/status/1734967567075168697) | [Recording](https://www.youtube.com/watch?v=yYt600kvf4g) |
| 1 | November 29, 2023 | [Agenda](https://github.com/celestiaorg/CIPs/issues/8) | [Tweet Thread](https://x.com/JoshCStein/status/1729893879191621702) | [Recording](https://www.youtube.com/watch?v=EhWHHmPo_5Q) |

## Site

This is a [Vocs](https://vocs.dev) project bootstrapped with the Vocs CLI.

│ Next steps:
◇ 1. cd ./site - Navigate to project
◇ 2. pnpm install - Install dependencies
◇ 3. pnpm dev - Start dev server
◇ 4. Head to http://localhost:5173
21 changes: 21 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# production
/dist

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# typescript
*.tsbuildinfo
1 change: 1 addition & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a [Vocs](https://vocs.dev) project bootstrapped with the Vocs CLI.
79 changes: 79 additions & 0 deletions site/addFrontmatter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import fs from 'fs';
import path from 'path';
import matter from 'gray-matter';

function addFrontmatterToContent(filePath) {
const fileContent = fs.readFileSync(filePath, 'utf-8');
const parsedContent = matter(fileContent);

// Convert the Date object to a string in the yyyy-mm-dd format
const createdDate = new Date(parsedContent.data.created);
const createdDateString = `${createdDate.getFullYear()}-${String(createdDate.getMonth() + 1).padStart(2, '0')}-${String(createdDate.getDate()).padStart(2, '0')}`;

// Replace the Date object with the formatted string
parsedContent.data.created = createdDateString;

// Check if frontmatter already exists in the markdown body and at the top of the file
const frontmatterInBody = parsedContent.content.includes(`**CIP**: ${parsedContent.data.cip}`) &&
parsedContent.content.includes(`**Author**: ${parsedContent.data.author}`) &&
parsedContent.content.includes(`**Status**: ${parsedContent.data.status}`) &&
parsedContent.content.includes(`**Type**: ${parsedContent.data.type}`) &&
parsedContent.content.includes(`**Created**: ${parsedContent.data.created}`);

const frontmatterAtTop = fileContent.startsWith(`---\ncip: ${parsedContent.data.cip}\ntitle: ${parsedContent.data.title}\nauthor: ${parsedContent.data.author}\nstatus: ${parsedContent.data.status}\ntype: ${parsedContent.data.type}\ncreated: ${parsedContent.data.created}\n---`);

if (frontmatterInBody && frontmatterAtTop) {
return; // If frontmatter already exists in the markdown body and at the top of the file, return without writing the file
}

// If frontmatter doesn't exist in the markdown body or at the top of the file, add it
let newContent = `# ${parsedContent.data.title}\n\n`;
newContent += `**CIP**: ${parsedContent.data.cip}\n\n`;
newContent += `**Author**: ${parsedContent.data.author}\n\n`;
newContent += `**Status**: ${parsedContent.data.status}\n\n`;
newContent += `**Type**: ${parsedContent.data.type}\n\n`;
newContent += `**Created**: ${parsedContent.data.created}\n\n`;

if (parsedContent.data.description) {
newContent += `**Description**: ${parsedContent.data.description}\n\n`;
}

if (parsedContent.data['discussions-to']) {
newContent += `**Discussions To**: ${parsedContent.data['discussions-to']}\n\n`;
}

if (parsedContent.data.category) {
newContent += `**Category**: ${parsedContent.data.category}\n\n`;
}

if (parsedContent.data.requires) {
newContent += `**Requires**: ${parsedContent.data.requires}\n\n`;
}

newContent += parsedContent.content;

// Preserve the original frontmatter and append the new content
const updatedContent = matter.stringify(newContent, parsedContent.data, {
replacer: (key, value) => {
if (key === 'created' || key === 'last-call-deadline') {
return value.replace(/'/g, '');
}
return value;
},
});
fs.writeFileSync(filePath, updatedContent, 'utf-8');
}

const directoryPath = 'docs/pages/cips';

fs.readdir(directoryPath, (err, files) => {
if (err) {
return console.log('Unable to scan directory: ' + err);
}

files.forEach((file) => {
if (path.extname(file) === '.md') {
addFrontmatterToContent(path.join(directoryPath, file));
}
});
});
File renamed without changes
121 changes: 121 additions & 0 deletions site/docs/pages/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Creative Commons Legal Code

CC0 1.0 Universal

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:

i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.

4. Limitations and Disclaimers.

a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
2 changes: 1 addition & 1 deletion cips/cip-1.md → site/docs/pages/cips/cip-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -660,4 +660,4 @@ the CIP. Please direct all comments to the CIP editors.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-10.md → site/docs/pages/cips/cip-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ See the section on rationale for understanding the network halting risk.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-11.md → site/docs/pages/cips/cip-11.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ TBA

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-12.md → site/docs/pages/cips/cip-12.md
Original file line number Diff line number Diff line change
Expand Up @@ -604,4 +604,4 @@ With the forward relayer correctly embedded in the acknowledgement, and the reve

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-13.md → site/docs/pages/cips/cip-13.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ Each parameter within the governance model must be scrutinized for its security

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-14.md → site/docs/pages/cips/cip-14.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,4 @@ The implementation assumes other IBC application modules will not bind to ports

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
4 changes: 2 additions & 2 deletions cips/cip-15.md → site/docs/pages/cips/cip-15.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Param | Current | Proposed

Given this context, what is the distribution of memo lengths in practice? How often are they used vs. empty?

![Number of txs vs. memo length](../assets/cip-15/memo-length.svg)
![Number of txs vs. memo length](/assets/cip-15/memo-length.svg)

Observe that the distribution of memo lengths is spikey at 80 and 59 characters. The spike at 0 is expected (txs by default don't contain a memo). To learn why the other spikes exist, we have to inspect the most common memos:

Expand Down Expand Up @@ -195,4 +195,4 @@ Currently, the gas cost for a PayForBlob transaction accounts for the number of

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-2.md → site/docs/pages/cips/cip-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ Anyone meeting the above requirements may make a pull request adding themselves

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
<!-- markdownlint-enable MD013 -->
2 changes: 1 addition & 1 deletion cips/cip-3.md → site/docs/pages/cips/cip-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ The Celestia ecosystem is built on openness and free access, and the CIP process

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
<!-- markdownlint-enable MD013 -->
2 changes: 1 addition & 1 deletion cips/cip-4.md → site/docs/pages/cips/cip-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ As discussed in Rationale, data availability sampling light nodes need to at lea

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-5.md → site/docs/pages/cips/cip-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ Alternative designs:

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-6.md → site/docs/pages/cips/cip-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ In the initial version of this where a static value is used, changing the value

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-7.md → site/docs/pages/cips/cip-7.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ The management of working groups primarily involves process and communication se

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-8.md → site/docs/pages/cips/cip-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ The primary security considerations involve maintaining the confidentiality and

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion cips/cip-9.md → site/docs/pages/cips/cip-9.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,4 @@ We recommend that users set the intermediate receivers to a string such as "pfm"

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
23 changes: 22 additions & 1 deletion cips/cip-template.md → site/docs/pages/cips/cip-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@ created: Date created on, in ISO 8601 (yyyy-mm-dd) format
requires: CIP number(s). Only required when you reference an CIP in the `Specification` section. Otherwise, remove this field.
---

# The CIP title is a few words, not a complete sentence

**CIP**: undefined

**Author**: a comma separated list of the author’s or authors’ name + GitHub username (in parenthesis), or name and email (in angle brackets). Example, FirstName LastName (@GitHubUsername), FirstName LastName [email protected], FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)

**Status**: Draft

**Type**: Standards Track, Meta, or Informational

**Created**: Date created on, in ISO 8601 (yyyy-mm-dd) format

**Description**: Description is one full (short) sentence

**Discussions To**: URL

**Category**: Core, Data Availability, Networking, Interface, or CRC. Only required for Standards Track. Otherwise, remove this field.

**Requires**: CIP number(s). Only required when you reference an CIP in the `Specification` section. Otherwise, remove this field.


> Note:
**READ CIP-1 BEFORE USING THIS TEMPLATE!**
This is the suggested template for new CIPs. After you have filled in the requisite fields, please delete these comments. Note that an CIP number will be assigned by an editor. When opening a pull request to submit your CIP, please use an abbreviated title in the filename, `cip-draft_title_abbrev.md`. The title should be 44 characters or less. It should not repeat the CIP number in title, irrespective of the category.
Expand Down Expand Up @@ -90,4 +111,4 @@ The current placeholder is acceptable for a draft.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
Copyright and related rights waived via [CC0](https://github.com/celestiaorg/CIPs/blob/main/LICENSE).
Loading