Skip to content

Commit 064acca

Browse files
authored
Infrastructure: Add title to codepen page (pull #1596)
1 parent b4cedce commit 064acca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/js/examples.js

+4
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,11 @@ function addOpenInCodePenForm(
398398
''
399399
);
400400

401+
var path = location.pathname.split('/');
402+
var filename =
403+
path.length > 0 ? path[path.length - 1].replace('.html', '') : '';
401404
var postJson = {
405+
title: filename,
402406
html: exampleHtml,
403407
css: '',
404408
js: '',

0 commit comments

Comments
 (0)