scholars.forum

Home | About | Getting Started Join Login

Accounts | Managing Files | Writing Markdown | Advanced Topics


Advanced Topics

Contents

  1. Bring your own domain name
  2. Custom page variables
  3. Blogs
  4. Within-page links
  5. HTML and CSS


Phenakistoscopes by Joseph Plateau And Simon Von Stampfer


Bring your own domain name

By default, scholars.forum accounts are accessible at the scholars.forum/username URL scheme. However, it is also possible to serve your pages from a custom domain, such as your-name.com.

To use a custom domain name with your scholars.forum account:

  1. Secure the domain name using a registrar (such as Porkbun)
  2. Follow your registrar’s instructions to set a DNS A Record for your domain to the scholars.forum IP address 46.225.4.214
  3. Send notice of the custom domain to support@scholars.forum

Custom page variables

Special variables pertaining to each page can be set between a --- delimited variable block at the beginning of the page.

Available variables are:

title
string (e.g. Custom title!) [default: first heading]
date
YYYY-MM-DD (e.g. 1999-12-31) [default: page creation date]
style
string (e.g. serif) [default: sans]
math
boolean (e.g. true) [default: false]

Variables are set like so:

---
title: Custom title
date: 1905-01-01
style: serif
math: true
---

title

The title of each page is what appears in a web browser’s title bar when you visit it. For example, this page’s title is Advanced Topics | Getting Started @scholars.forum.

The title of each page is automatically set to the text of the first top-level header on the page. For example, if your page content is

# Albert Einstein

Hello, and welcome to my homepage...

the title of the page would be Albert Einstein @scholars.forum.

Setting the title variable in a page’s variable block overrides this automatic title. For example,

---
title: Custom title
---

would make the title of the page Custom title @scholars.forum.

date

Each page has an associated date -- normally, the date the page was created. On blog listings, this date is shown next to the page title.

You can set a page’s date to a specific date by setting the date variable in the page’s variable block.

style (style sheet)

scholars.forum pages are styled using a style language called CSS, which allows the look of a page to be separated from its content. By default, scholars.forum pages employ a simple style sheet that uses a sans-serif font for content and a serif font for headings.

Setting the style variable in a page’s variable block will replace the default stylesheet with another.

Currently, two stylesheets are available:

  • serif - uses the font Georgia for all headings
  • sans - uses the system’s sans-serif font all content, including headings

math (equations and symbolic notation)

You can include mathematical equations and other symbolic notation on your page using MathJax.

To write an equation, first set the math custom page variable to true:

---
math: true
---

On the page, symbolic notation is delimited using $ for inline equations. For example:

$e = mc^2$ is rendered as $e = mc^2$

For block equations, or equations that don’t render correctly using the inline $ delimiter, use the ``` code block delimiter with a math language tag, like so:

 ``` math
 \sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^N (x_i -\mu)^2}
 ```   
\[ \sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^N (x_i -\mu)^2} \]

MathJax typesets LaTeX-style notation. For more information, see:

Additionally, asciimath notation can be used, delimited by $$$. For example,

$$${(2x,+,17y,=,23),(x,-,y,=,5):}$$$

is rendered as

$$${(2x,+,17y,=,23),(x,-,y,=,5):}$$$

Blogs

Folders without an index.md file will instead be displayed as a directory of pages.

You can use this functionality to create a blog.

  1. Create a new folder named Blog
  2. Add blog posts as new pages in the Blog folder
  3. Set each blog post page’s date variable if necessary

Afterwards, when visiting scholars.forum/yoursite/Blog, a list of posts will be shown, organized by date.

Page headings are automatically created as page anchors, which allows you to link directly to that part of a page. Anchors are composed using an all-lowercase version of the heading text, with spaces replaced by dashes. For example, a heading ### Heading 3 is given the anchor #heading-3; and a heading # Foo bar is given the anchor #foo-bar. (The Markdown heading level is irrelevant.)

Anchors can be the target of links, in the form

[link text](page_name#anchor-name)

or, if linking within the same page, simply

[link text](#anchor-name).

This can be useful for creating tables of contents, linking to a section of a long document, etc.

For example, this section’s heading Within-page links has the anchor #within-page-links. On this page, this can be linked to as

[Within-page links](#within-page-links)

From other pages, this can be linked to as

[Within-page links](advanced.html#within-page-links)

HTML and CSS

scholars.forum pages are designed to be written in Markdown, not HTML, and styled using the available style sheets. However, a subset of HTML and CSS can be included on scholars.forum Markdown pages.

The baseline allowed HTML set is determined by the bluemonday user-generated content policy.

The following additional HTML elements are allowed:

  • button
  • code
  • center

Inline CSS can be set using the style attribute on the following elements:

  • span
  • a
  • img
  • figure
  • p
  • hr

The target attribute can be set on a elements.

Links are allowed using the http, https, and mailto schemes.