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

Fix site variable replacement error #5829

Closed
atsansone opened this issue May 15, 2024 · 1 comment · Fixed by #5826
Closed

Fix site variable replacement error #5829

atsansone opened this issue May 15, 2024 · 1 comment · Fixed by #5826
Assignees
Labels
e1-hours Can complete in < 8 hours of normal, not dedicated, work infra.structure Relates to the tools that create dart.dev lang.javascript Involves Javascript code p1-high Major but not urgent concern: Resolve in months. Update each month. st.triage.ltw Indicates Lead Tech Writer has triaged

Comments

@atsansone
Copy link
Contributor

atsansone commented May 15, 2024

This was found when working on #5826

This PR seems to generate errors no matter how I approach remediating the problem.

In _includes/install/macos.md, line 82:

If I write it as:

[tap]: {{site.repo.dart.org}}/homebrew-dart

I get a bad link error.

https://github.com/dart-lang/site-www/actions/runs/9103552699/job/25025626288?pr=5826

Run dart run dart_site check-links
Starting the Firebase hosting emulator asynchronously...
Crawling...

http://localhost:5500/get-dart
- (1580:11) 'official..' => http://localhost:5500/homebrew-dart (HTTP 404)


Stats:
  166163 links
     755 destination URLs
     791 URLs ignored
       0 warnings
       1 errors

Shutting down Firebase hosting emulator...
Done!

Error: Process completed with exit code 2.

If I replace the copy as:

[tap]: https://github.com/dart-lang/homebrew-dart

I get a replaceable content error.

Run dart run dart_site check-site-variable

📂 [File Path]: ./src/_includes/install/macos.md
├── 🔍 [Variable Key]: site.repo.dart.org
└── 🔍 [Variable Value]: https://github.com/dart-lang

    ├── 📄 [Replaceable content (total 1)]: https://github.com/dart-lang
    └── 💡 [Suggestion]: Replace all "https://github.com/dart-lang" with "{{site.repo.dart.org}}"
        └── ./src/_includes/install/macos.md:82:8


🌏  Done! 
    Total scanned: 
    ├── All variables: 26 (YAML Key)
    └── All files: 185

    Issues: 
    └── Replaceable contents: 1 (Related files: 1)

Error: Process completed with exit code 2.

This leaves me with no way to merge this PR. Help!

@atsansone atsansone added infra.structure Relates to the tools that create dart.dev p1-high Major but not urgent concern: Resolve in months. Update each month. e1-hours Can complete in < 8 hours of normal, not dedicated, work lang.javascript Involves Javascript code st.triage.ltw Indicates Lead Tech Writer has triaged labels May 15, 2024
@parlough
Copy link
Member

parlough commented May 16, 2024

I'm assuming this might be because you are using render. There's currently an issue where includes using render doesn't have access to global data. @atsansone Can you try replacing it to include to see if it works as expected?

atsansone added a commit that referenced this issue May 31, 2024
Fixes #3187
Fixes #5829

---------

Co-authored-by: Parker Lougheed <parlough@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e1-hours Can complete in < 8 hours of normal, not dedicated, work infra.structure Relates to the tools that create dart.dev lang.javascript Involves Javascript code p1-high Major but not urgent concern: Resolve in months. Update each month. st.triage.ltw Indicates Lead Tech Writer has triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants