Site code
Go to file
Jocelyn Badgley 26a55741d1
Address generalization in physical dysphoria page
Fixes #151
2024-03-25 07:49:00 -07:00
.github Add dependabot (#142) 2023-12-06 09:18:23 -08:00
analytics Add dependabot (#142) 2023-12-06 09:18:23 -08:00
build Fix links to headers with symbols (#147) 2024-01-07 10:01:48 -08:00
gulp Update to latest @twipped/eslint-config 2023-01-02 14:58:23 -08:00
js Update to latest @twipped/eslint-config 2023-01-02 14:58:23 -08:00
posts Add Alex's thread on the burning of the Institute of Sexual Sciences 2022-01-29 08:49:11 -08:00
public Address generalization in physical dysphoria page 2024-03-25 07:49:00 -07:00
resources Missed an image 2023-12-06 09:10:12 -08:00
scss Add Portuguese translation (light version) (#111) 2022-10-23 10:49:09 -07:00
svg Fix ko-fi svg 2021-12-15 19:46:41 -08:00
templates Updating patreon list 2023-12-06 09:05:44 -08:00
terraform chore(terraform): add tfstate backup to s3 bucket 2023-08-21 12:23:16 -07:00
tools Moving files around for better support for translations 2021-08-11 13:13:05 -07:00
twitter-avatars Add Alex's thread on the burning of the Institute of Sexual Sciences 2022-01-29 08:49:11 -08:00
twitter-entities Add Alex's thread on the burning of the Institute of Sexual Sciences 2022-01-29 08:49:11 -08:00
.browserslistrc New preact based frontend UI for the TTT. 2020-03-08 14:01:00 -07:00
.editorconfig Initial site commit 2020-02-20 14:38:25 -08:00
.eslintignore Update to latest @twipped/eslint-config 2023-01-02 14:58:23 -08:00
.eslintrc Update to latest @twipped/eslint-config 2023-01-02 14:58:23 -08:00
.gitignore Disabling twitter api config 2023-12-06 09:05:38 -08:00
.nvmrc Migrate to Node 16 (#118) 2023-01-02 14:03:02 -08:00
LICENSE.txt Initial site commit 2020-02-20 14:38:25 -08:00
README.md Migrate to Node 16 (#118) 2023-01-02 14:03:02 -08:00
aws.json.example Fixed lang attribute in <html> tag 2021-08-04 21:26:05 -03:00
babel.config.js Dependency bump 2021-08-11 12:09:59 -07:00
favicon.png Initial site commit 2020-02-20 14:38:25 -08:00
gulpfile.js Initial site commit 2020-02-20 14:38:25 -08:00
lang.yaml Continuing work on a build pipeline 2022-06-22 15:13:16 -07:00
package-lock.json Add dependabot (#142) 2023-12-06 09:18:23 -08:00
package.json Add dependabot (#142) 2023-12-06 09:18:23 -08:00
server.js Update to latest @twipped/eslint-config 2023-01-02 14:58:23 -08:00
thread.js Update to latest @twipped/eslint-config 2023-01-02 14:58:23 -08:00
twitter-backup.json Add Alex's thread on the burning of the Institute of Sexual Sciences 2022-01-29 08:49:11 -08:00
twitter-i18n.json Add Portuguese translation (light version) (#111) 2022-10-23 10:49:09 -07:00

README.md

Codebase for the Gender Dysphoria Bible.

Code for this site is distributed as MIT licensed.

Site content such as essays and photo materials are copyright Jocelyn Badgley & other contributors, and are licensed Creative Commons, Attribution-NonCommercial-ShareAlike (see LICENSE.txt).

How to use this repository

The GDB is a static content site generated using a custom built framework written in Node.js. The majority of the code that drives the build process sits in the build directory. This code is activated via a GulpJS command interface.

You do not need to be able to execute the generation code in order to contribute content. All site content is stored in the public folder, with the GDB content under public/gdb. Changes to this content can be done to anyone who is experienced with HTML and git source control.

Site Content

Page content is in markdown format, extended with a custom form of Handlebars for content injection. Sections wrapped {!{like this}!} are blocks of handlebar code that will be rendered as embedded HTML.

The beginning of each markdown file contains a YAML formatted header block with metadata relevant to that file. The keywords at the start of each line are significant to the page generation process.

  • date: This defines the creation date of the page and should never be changed unless a new page is created.
  • title: This is the title of the page as it appears in the browser titlebar and when embedded on social media.
  • description: This is the description of the page that appears when linked on social media.
  • preBody: This defines the file to use for the block of text that appears at the top of each page in the GDB.
  • siblings`: This controls the navigation links that appear at the bottom of each page.
  • classes: These are the css classes to apply to the page body for styling the page.
  • tweets: This is a list of twitter urls or tweet ids that are embedded on the page. This is necessary for the engine to gather those tweets during the pre-render process so that they are available for embedding.

There are various content templates used throughout the pages that render common page elements, such as images and tweet blocks. These are imported using {{import }} handlebars blocks. Reference existing pages for examples of how to use these.

The img block can access any images stored either in the _images directory on the same level as the markdown file. They are made available by name, without the file extension. Any image prefixed with an underscore (such as _titlecard.png) is treated as a pre-made asset and will NOT be processed into different resolutions for site optimization.

Site Styling

All stylesheets for the site are built using SCSS and are are stored in the scss directory. Styling is broken into various subset files, organized by purpose. The site styling is built on top of Bootstrap 4 and makes used of its variables, mixins and components.

Building the site with NodeJS

To execute this codebase you will need to have Node.js and npm installed on your computer and be familiar with the command line interface. Your computer will also need to have the gd and graphicsmagick libraries installed. See the build instructions below.

After cloning this repository to your computer you will need to run npm install in the project directory to install all of the dependency modules. If you haven't previously used gulp, you will also need to install the gulp CLI tools with npm install --global gulp-cli. Once this install is complete you can build the site by running the gulp command. This will compile all of the image assets, render the site stylesheets, and build the individual pages, before launching a local webserver to host the site for previewing the rendered content. Any changes made to the content while this server is running will trigger a recompile so that the page can simply be reloaded.

The command gulp uat will build the site as if it is prepared for deployment to the website. This performs extra optimizations to reduce the size of the site.

You can use npm run build to trigger the Gulp build process for production.

Tweet Content

The file twitter-backup.json contains the contents of all tweets used on the site. In order to add new tweets to the website (and be able to have them displayed), you will need to create a twitter-config.json file in the site root containing your own personal twitter API credentials.

The file is in this format:

{
  "consumer_key": "YOUR",
  "consumer_secret": "TWITTER",
  "access_token_key": "CREDENTIALS",
  "access_token_secret": "HERE"
}

Site Publishing

Publishing the site content requires AWS credentials which are not stored in this repository. Attempts to use the gulp publish command will fail.