Skip to content

Commit

Permalink
fix: permalink was not correct. (#7)
Browse files Browse the repository at this point in the history
fix: www was hard coded as the source folder. now it correctly uses the set source folder
feat: render sitemap.xml file
feat: modify the api to enable building blog sites
BREAKING CHANGE: Changed the hook API to enable externalizing building things like a sitemap and blog index
  • Loading branch information
joeyguerra authored Dec 14, 2023
1 parent 81e0926 commit dee09ca
Show file tree
Hide file tree
Showing 4 changed files with 296 additions and 330 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ sfab --folder ./docs --destination ./_site --verbose --serve /hubot/ --watch-pat
npx @hubot-friends/sfab --folder ./docs --destination ./_site --verbose --serve /hubot/ --watch-path ./docs --scripts ./sfab-hooks
```

# Copy another folder to destination

```sh
sfab --folder ./docs --destination ./_site --verbose --serve /hubot/ --watch-path ./docs --copy ./resources
```

## Example Hook

```javascript
Expand All @@ -82,15 +88,19 @@ export default () => {
}
}
},
async transformed(transformedFilePath) {
async transformed(viewKey, transformedFilePath, model, html, viewModel) { // model is the object passed to the temlating engines, viewModel is the object that comes from markdown meta data or html item props.
// do something during transformation
},
async copied(filePath) {
// file wsa copied to this filePath.
// file was copied to this filePath.
},
async partial(partialName, partial, handebars) {
// partial was registered. passing handlebars if you want to register more.
}
}
}
```

```sh
npm start -- --folder ../../hubotio/hubot/docs --destination ../../hubotio/hubot/_site --verbose --serve /hubot/ --watch-path ../../hubotio/hubot/docs --scripts ../../hubotio/hubot/sfab-hooks
```
Loading

0 comments on commit dee09ca

Please sign in to comment.