npm package to help automate some tasks (https://www.npmjs.com/package/@zetxek/adritian-theme-helper) for the Adrian Hugo theme adritian.
It downloads the content from the adritian-demo repository and copies it to the current directory.
✨ Theme theme is entirely free and open source. We welcome your ideas, feedback, and contributions! If you find it useful, please give it a GitHub star to show your support.
Most likely you will want to follow the theme installation instructions (https://github.com/zetxek/adritian-free-hugo-theme?tab=readme-ov-file#as-a-hugo-module-recommended), where this script will be installed as part of
hugo mod npm pack
npm I
If for some reason (such as using the theme not as a hugo module), you can still install and run the script, by running:
npm install @zetxek/adritian-theme-helper
npm run download-content
The script can download specific directories. The default is to download all of them.
npm run download-content -- i18n data content assets static config
You can specify a branch to download from using the --branch
or -b
flag:
npm run download-content --branch develop
# Or with specific directories
npm run download-content --branch develop content i18n
The update-font
script helps you update font files in your theme. It copies font files, CSS, and configuration from a source directory to your Hugo site's appropriate directories.
In order to generate the font files, you can check the PR here.
Once you have the font files downloaded, you can run the script to update your font files in the theme:
ts-node scripts/update-font.ts <source> <destination>
ts-node scripts/update-font.ts ./my-font-source ./my-hugo-site
- Verifies that both source and destination directories exist
- Checks for required subdirectories in the destination:
static/fonts
assets/css
- Copies files from source to destination:
css/*
→assets/css/
config.json
→static/fonts/config.json
font/*
→static/fonts/
- Skips specific files:
adritian-icons-ie7-codes.css
adritian-icons-ie7.css
- Replaces
/font/
with/fonts/
in all CSS files and config.json - Asks for confirmation before overwriting existing files
Your source directory should have this structure:
source/
├── css/
│ └── (CSS files)
├── font/
│ └── (font files)
└── config.json
- The script will prompt for confirmation before overwriting any existing files
- You can choose to skip specific files during the update process
- The script automatically handles nested directories
- All file operations are logged for transparency
npm run download-content