|
7 months ago | |
---|---|---|
.circleci | 3 years ago | |
.github | 3 years ago | |
bin | 4 years ago | |
lib | 3 years ago | |
production | 3 years ago | |
routes | 3 years ago | |
scaffolds | 4 years ago | |
source | 7 months ago | |
themes | 2 years ago | |
views | 4 years ago | |
.dockerignore | 3 years ago | |
.env.example | 3 years ago | |
.eslintignore | 4 years ago | |
.eslintrc | 3 years ago | |
.gitignore | 4 years ago | |
.gitmodules | 4 years ago | |
.markdown.style.rb | 3 years ago | |
.mdlrc | 3 years ago | |
.nvmrc | 4 years ago | |
.yarnclean | 4 years ago | |
CODE_OF_CONDUCT.md | 3 years ago | |
CONTRIBUTING.md | 3 years ago | |
Dockerfile | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
_config.yml | 2 years ago | |
app.js | 3 years ago | |
docker-compose.yml | 3 years ago | |
npm-shrinkwrap.json | 3 years ago | |
package.json | 3 years ago | |
yarn.lock | 3 years ago |
A Static Site for redbrick generated with hexo using a theme based off icarus
To set up the for development
yarn
this will install all the dependencies
copy .env.example
to .env
yarn start
to create start the serve
To generate new posts
yarn posts [title]
This will create a new post in source/_post/[title].md
To generate new pages:
yarn page [title]
this will create a new page in source/[title]/index.md
To edit the sidebar:
themes/redbrick-theme/_config.yaml
- this is where all the theme configuration is controlled from.Theres a docker-compose.yml
for development.
.env.example
to .env
docker-compose up
yarn start
. This will create a server that runs on localhost:3000
yarn hexo
. This will create a server that runs on localhost:4000
themes/redbrick-theme/source/css
themes/redbrick-theme/layout
Analytics can be enabled by adding your analytics key to theme/redbrick/_config.yaml
To deploy to a server run:
yarn
this will install all the dependencies_config.yml
as neededproduction/website.service
to /etc/systemd/system
yarn generate
to create initial sitesystemctl start website
to start the express serverYou will also need to create three files:
mailing_list
a newline-separated list of email addressesemail_update_log
a newline-separated reverse-chronological list of times email updates were sent.env
by copying .env.example
and modifying values (important)mailing_list
and email_update_log
can be left blank, though updates for every post in history
will be sent if no previous send date is specified.
Then using apache or nginx proxy traffic to port 3000.
And done.
To use docker in production theres a docker-compose.yml
in the production folder.
.env.example
to .env
relative to the docker-compose.yml
..env
mailing_list
and add email addresses for announcedocker-compose up -d
http://[sitehost]/api/regenerate?token=your_secret_token
will run hexo generate
and send emails for any new posts so long as that process is not already underway.To use sendmail rather then SMTP in the _config.yml
set useSendMail
to true
.
To disable auth on SMTP leave auth.user
and auth.pass
as empty.
Modify the host, and port options as needed for SMTP either in the config or using the env variables.
Variable | Example | Description |
---|---|---|
SECRET_API_TOKEN |
API key for regenerating the site | |
RECAPTCHA_SECRET_KEY |
Recaptcha server key from Google | |
RECAPTCHA_SITE_KEY |
Recaptcha site key same as the on in the theme | |
LOG_ROTATE |
24h |
When to rotate logs |
SMTP_HOST |
mailhost.redbrick.dcu.ie |
SMTP host address |
SMTP_PORT |
25 |
SMTP port for server |
SMTP_SECURE |
false |
if using SSL or not |
SMTP_USER |
no-reply |
redbrick username for SMTP auth leave off the @redbrick.dcu.ie |
SMTP_PASS |
account password | |
SMTP_AUTH_METHOD |
plain |
auth method to use with SMTP. Defaults to plain |
PORT |
3000 |
port to run the server on defaults to 3000 |
Official website of DCU Redbrick Society.
Copyright (C) 2017 Redbrick and all contributors.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.