Giter Site home page Giter Site logo

factastichealth_website's Introduction

factastichealth website

Priamry deployment:

https://vigorous-hawking-a51951.netlify.app/

Alternative deployment:

https://admiring-edison-538e61.netlify.app/

Categories and tags

Categories and tags are added ad-hoc. If an article has a tag, the tag exists and a tag page is created. If a tag is removed from every article, the tags gets removed and the tag page is never created. Same for categories.

Post order

Posts are ordered by date, from newer to older.

Images with captions

For Kramdown (the Markdown parser) to recognize images as figures with captions, this special syntax is required:

Surrounding text

![Image caption](/image/url.jpg){:standalone}

More text

The {:standalone} part signals Kramdown to create a <figure> HTML element with a caption.

For Netlify CMS, add an image and turn the editor into Markdown mode so you can add the standalone syntax.

Netlify CMS

Visit https://factastichealth.com/admin/ and login with Github account to edit site contents. To configure this:

  • Visit Settings > Access Control on Netlify's panel
  • Install Github as an OAuth Provider

More documentation here:

Currently, there's a bug preventing spaces on the tags and categories fields. For the time being, tags and categories with spaces can be edited manually.

Adding articles manually

Blog

Create a file _posts/aaaa-mm-dd-downcase-title-without-spaces.md. aaaa-mm-dd is the publication date, for instance 2021-03-31. After that comes the "slug" which acts as the URL, so an article entitled "The Power of Fasting and Why am I Doing It" has a slug of the-power-of-fasting-and-why-am-i-doing-it and its URL will be https://factastichealth.com/the-power-of-fasting-and-why-am-i-doing-it/.

Template for new files:

---
layout: post
categories:
- Category
- Category 2
title: Article title
tags:
- Tag
- Tag 2
image: /path/to/file.jpg
---

Markdown content

The .md extension is important for Netlify CMS to be able to edit articles. .markdown won't work.

Pages

Pages are files under _pages/slug.md, without a date.

---
layout: page
title: Page title
footer: true
---

Markdown content

The footer field is used to determine if a page is linked from the footer or not.

Wordpress migration

Articles that existed on Wordpress have an id field to match them to the posts table. Images were downloaded on the wp-content/ directory so they keep their URLs.

Newsletter

Configure Netlify environment with:

JEKYLL_NEWSLETTER_FROM
JEKYLL_NEWSLETTER_TO
JEKYLL_NEWSLETTER_USERNAME
JEKYLL_NEWSLETTER_PASSWORD

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.