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

Backticks in CIP titles cause build to fail #1343

Closed
Fell-x27 opened this issue Oct 17, 2024 · 4 comments
Closed

Backticks in CIP titles cause build to fail #1343

Fell-x27 opened this issue Oct 17, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Fell-x27
Copy link
Contributor

OS: Linux Mint Virginia (Ubuntu Based)
NodeJS: 22.9.0

Error:

[ERROR] Error while parsing Markdown front matter.
This can happen if you use special characters in front matter values (try using double quotes around that value).
[ERROR] Loading of version failed for version current
[ERROR] Unable to build website for locale en.
[ERROR] Error: Can't process doc metadata for doc at path path=./developer-portal/docs/governance/cardano-improvement-proposals/CIP-0127.md in version name=current
    at processDocMetadata (./developer-portal/node_modules/@docusaurus/plugin-content-docs/lib/docs.js:200:15)
    at async Promise.all (index 207)
[INFO] Docusaurus version: 2.4.3
Node version: v22.9.0

Steps to reproduce in a clean environment:


#HOST OS
#preparing env
sudo apt install lxc
sudo lxc-create -n test -t download -- --dist mint --release virginia --arch amd64

#HOST OS
#run and log in
sudo lxc-start -n test
sudo lxc-attach -n test

#########################

#CONTAINER OS
#install stuff
apt install git curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install node
npm install -g yarn

#CONTAINER OS
#clone repo and build it with yarn
git clone https://github.com/cardano-foundation/developer-portal.git
cd developer-portal
yarn install
yarn build

#see the error...

#CONTAINER OS
#leave the container
exit

#########################

#HOST OS
# stop and remove it
sudo lxc-stop -n test
sudo lxc-destroy -n test

@Fell-x27
Copy link
Contributor Author

Fell-x27 commented Oct 17, 2024

If I add:

    if (cip_name === "./CIP-0127") {
        return "";
    }

to the processCIPContentAsync function in order to ignore this file, everything works just perfect.

But it's not the solution, of course. There's something wrong with the file that needs to be fixed:

This can happen if you use special characters in front matter values (try using double quotes around that value).

Probably , it's the " ` " symbols in the YAML part?

@rphair rphair changed the title Can't build the app locally; Backticks in CIP titles cause build to fail Oct 18, 2024
@rphair rphair added the bug Something isn't working label Oct 18, 2024
@rphair
Copy link
Collaborator

rphair commented Oct 18, 2024

@Fell-x27 you got it, as @katomm also reported in #1335 (comment). This has been fixed upstream in cardano-foundation/CIPs#930 and will build normally as soon as that PR is merged... I've asked the other CIP editors to expedite review & merging it.

@rphair rphair closed this as completed Oct 18, 2024
@rphair
Copy link
Collaborator

rphair commented Oct 18, 2024

Backticks are removed in master branch now (cardano-foundation/CIPs@e4c5f48) so you should no longer have this problem.

@Fell-x27
Copy link
Contributor Author

@rphair , yep, no more failures occurred!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants