fix broken scripts (#834)

This commit is contained in:
Echo 2026-01-25 15:24:51 -05:00 committed by GitHub
parent 04ffb1de38
commit 2960a720d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 13 additions and 13 deletions

View file

@ -11,10 +11,10 @@
{
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": <%= @title.to_json %>,
"description": <%= generate_doc_description(@content, @title).to_json %>,
"url": <%= doc_url(@doc_path).to_json %>,
"dateModified": <%= (File.mtime(safe_docs_path("#{@doc_path}.md")).iso8601 rescue Time.current.iso8601).to_json %>,
"headline": <%== @title.to_json %>,
"description": <%== generate_doc_description(@content, @title).to_json %>,
"url": <%== doc_url(@doc_path).to_json %>,
"dateModified": <%== (File.mtime(safe_docs_path("#{@doc_path}.md")).iso8601 rescue Time.current.iso8601).to_json %>,
"author": {
"@type": "Organization",
"name": "Hack Club",
@ -27,7 +27,7 @@
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": <%= doc_url(@doc_path).to_json %>
"@id": <%== doc_url(@doc_path).to_json %>
},
"about": {
"@type": "SoftwareApplication",

View file

@ -53,7 +53,7 @@
}
function updateProjectsFrame(url) {
let baseUrl = <%= project_durations_static_pages_path.to_json %>;
let baseUrl = <%== project_durations_static_pages_path.to_json %>;
const params = new URLSearchParams(new URL(url).search);
const frameUrl = baseUrl + '?' + params.toString();

View file

@ -144,7 +144,7 @@
// update content-frame url for Turbo
const contentUrl = new URL(window.location);
contentUrl.pathname = <%= filterable_dashboard_content_static_pages_path.to_json %>;
contentUrl.pathname = <%== filterable_dashboard_content_static_pages_path.to_json %>;
contentUrl.searchParams.set(param, selected.join(","));
frame.src = contentUrl.toString();

View file

@ -238,9 +238,9 @@
}
function check() {
fetch(<%= api_v1_my_heartbeats_most_recent_path(source_type: "test_entry").to_json %>, {
fetch(<%== api_v1_my_heartbeats_most_recent_path(source_type: "test_entry").to_json %>, {
headers: {
'Authorization': 'Bearer ' + <%= @current_user_api_key.to_json %>
'Authorization': 'Bearer ' + <%== @current_user_api_key.to_json %>
}
})
.then(response => response.json())
@ -280,7 +280,7 @@
check();
window.skipToNext = function() {
window.location.href = <%= my_wakatime_setup_step_2_path.to_json %>;
window.location.href = <%== my_wakatime_setup_step_2_path.to_json %>;
};
});

View file

@ -337,9 +337,9 @@ git clone https://github.com/wakatime/vim-wakatime.git</code></pre>
}
function check() {
fetch(<%= api_v1_my_heartbeats_most_recent_path.to_json %>, {
fetch(<%== api_v1_my_heartbeats_most_recent_path.to_json %>, {
headers: {
'Authorization': 'Bearer ' + <%= @current_user_api_key.to_json %>
'Authorization': 'Bearer ' + <%== @current_user_api_key.to_json %>
}
})
.then(response => response.json())
@ -379,7 +379,7 @@ git clone https://github.com/wakatime/vim-wakatime.git</code></pre>
check();
window.skipToNext = function() {
window.location.href = <%= my_wakatime_setup_step_4_path.to_json %>;
window.location.href = <%== my_wakatime_setup_step_4_path.to_json %>;
};
});
</script>