pidgin/nest

c76fb0834ef9
Update the update-lastmod.js file to use date from file

The update-lastmod file was taking the first commit for the specific file and replacing the "date" attribute with the date of the commit. This fix sets the date as the attribute date if it exists and if it doesn't uses the first commit date.

Testing Done:
1. Build docker container
2. Run docker container
3. Run the update-lastmod.js script with node and verified that the files with dates stayed the same and ones without used the first commit.

Reviewed at https://reviews.imfreedom.org/r/640/
# Pidgin Nest
The place we like to call home.
This repository contains the source for the https://pidgin.im/ site.
## Dependencies
This project uses [hugo](https://gohugo.io/), get it
[here](https://gohugo.io/getting-started/installing/)
## Developing Docs
To start development server run:
`hugo server -s hugo -D --disableFastRender -v --verboseLog --noHTTPCache --i18n-warnings`
- `--disableFastRender` Disabling fast render is needed because hugo starts to
ignore new content in the data dir
- `-v --verboseLog` Better logging and debugging experience
- `--noHTTPCache` To prevent caching issues
## Docker
1. `docker build -t pidgin/nest:latest .`
2. `docker run -it --rm -p 3000:3000 pidgin/nest:latest`
## Formatting
These are some regex's to quickly format templating
| regex | replace |
| -------------------- | -------- |
| `\{\{(\w|\.|\$|\()` | `{{ $1` |
| `\{\{-(\w|\.|$)` | `{{- $1` |
| `("|\w|\.|\))(-)?}}` | `$1 }}` |
## Hugo config
To disable **Copy Code to Clipboard** the `disableInlineCopyToClipBoard` switch
can be used either in **config** `[params]` **or** in the front matter of the
individual page.
## Tools
- **Visual Regression**
1. [Run dev server](#Developing-Docs)
1. To run the visual diff tool call `node tools/visual-diff.js` or
`npm run regression`
## Alert Notification
![](docs/images/notifications.png)
Notifications are configured in `hugo/config.toml`:
```toml
[params]
notificationMessage = "Great News Everyone!"
notificationCode = "nest-launch"
```
- `notificationMessage` is the message and is fully HTML
- `notificationCode` is used as the key to remember if the notification has been cleared
If either of these are unset, the template will not render.
The notification template is rendered `display: none` in the
`hugo/layouts/partials/custom-footer.html`, and then hoisted to the top of the
page if the cookie is not equal to the code.