Spaces:
Configuration error
Configuration error
Download docs/scripts/checkIfFileExists.js from bisalsaha/lebel-studio: direct link, hf CLI and curl.
- Browser
- Download file 225 Bytes
-
https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/docs/scripts/checkIfFileExists.js
- Command line
-
hf download hf://spaces/bisalsaha/lebel-studio/docs/scripts/checkIfFileExists.js
-
curl -L -o checkIfFileExists.js https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/docs/scripts/checkIfFileExists.js
225 Bytes
| const fs = require('fs'); | |
| const path = require('path'); | |
| hexo.extend.helper.register('file_exists', function(filePath) { | |
| const fullPath = path.join(hexo.theme_dir, 'layout', filePath); | |
| return fs.existsSync(fullPath); | |
| }); | |