Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a73e4fd
Update packages
azangru Jan 6, 2021
e20ef07
Add a decisions file
azangru Jan 11, 2021
b4897e5
Add dependencies
azangru Jan 18, 2021
1e94d35
Add a script for building the menu from TOC files
azangru Jan 18, 2021
ca8fee9
Add documentation for TOC/menu
azangru Jan 25, 2021
2175305
Add documentation for Article
azangru Jan 31, 2021
5291cea
Add todo file
azangru Feb 9, 2021
e06ea6e
Update packages
azangru Feb 19, 2021
3018f26
Update todo
azangru Feb 19, 2021
6afb097
Add video type for articles
azangru Feb 21, 2021
54e4fac
Update dependencies
azangru Feb 21, 2021
1e21de0
Update scripts for reading files and creating articles
azangru Feb 25, 2021
c1608f9
Send articles in the response
azangru Feb 25, 2021
959cfc4
Attempt at refactoring to Type ORM
azangru Feb 26, 2021
4de6e84
Use many-to-many relationship for related article
azangru Feb 27, 2021
5436e1d
Use a single Article model for everything
azangru Feb 28, 2021
3fddc9a
Set up collections
azangru Mar 1, 2021
6c584cd
Update the endpoint for menus
azangru Mar 1, 2021
6272855
Cleanup
azangru Mar 1, 2021
4d27a4c
Move related video to related articles in the species selector article
azangru Mar 1, 2021
a01d63d
Update gitlab-ci to prevent deployments if not on master
azangru Mar 1, 2021
7e2be3c
Remove unused dependencies
azangru Mar 1, 2021
98a0a5a
Enable search by using sqlite's full-text search
azangru Mar 1, 2021
787a16d
Update url generation
azangru Mar 2, 2021
2b681ba
Remove Video.ts model
azangru Mar 2, 2021
245f3b6
Update articlesController to get proper fields for text and video art…
azangru Mar 3, 2021
db6a680
Update response from articlesController
azangru Mar 15, 2021
cfd7fc6
Update TOCs in about-ensembl
azangru Mar 15, 2021
409ba12
Fix gitlab-ci config for review branches
azangru Mar 15, 2021
d732286
Update Node in the Dockerfile
azangru Mar 15, 2021
bc54e82
Restore the copying of the static assets
azangru Mar 15, 2021
16631a3
Fix tests
azangru Mar 16, 2021
54561f4
Make sure to use url from TOC in menu collection elements
azangru Mar 17, 2021
288a856
Set links to internal pages
azangru Mar 18, 2021
a3460c3
Rename field in menus payload
azangru Mar 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ Live:WP-HH:
environment:
name : wp-hh-live
only:
- master
- master
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.16.2
FROM node:14.16.0

ARG SOURCE_DIR="."
ARG TARGET_DIR="/srv/ensembl-docs-server"
Expand Down
7 changes: 7 additions & 0 deletions decisions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Content-facing side of the model:

- [Table of Contents](toc-and-menu.md)
- Index page
- [Article](article.md)
- Video article
- List of Related Articles
147 changes: 147 additions & 0 deletions decisions/article.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Article

An Article is a plain-text file combining the text on a given topic with metadata about this text.


## Article metadata

The article metadata is written in the yaml format in the article frontmatter. Metadata includes the following fields:

| Field | Optional | Semantics |
|-------------------|----------|-------------------------------------|
| id (slug?) | yes | Short unique identifier of the article (derived from file path if absent)
| title | no | Title of the article (as will be presented to search crawlers)
| description | no | Brief summary of the article (as will be presented to search crawlers)
| related_articles | yes | ???
| external_links | yes | ???

Notice that the `title` and the `description` fields are mandatory for every article. This is because these fields will get indexed by search engines and will appear in the list of search results. See [Google's SEO recommendations](https://developers.google.com/search/docs/advanced/appearance/good-titles-snippets#create-good-meta-descriptions) (specifically, sections "Create descriptive page titles" and "Create good meta descriptions").

### External links

```yml
# part of the yaml frontmatter
external_links:
- name: Hello Google
href: "https://google.com"
- name: Hi Github
href: "https://github.com"
```


### Examples

#### A bare minimum

```yml
---
title: Species selector
description: How to select a species and genome assembly of interest to visualise in the genome browser and entitiy viewer
---
```

#### A page that gets shown when user clicks on the contextual help button

```yml
---
id: species-selector
title: Species selector
description: How to select a species and genome assembly of interest to visualise in the genome browser and entitiy viewer
---
```

Note in the snippet above that it includes the `id` field. This is a short identifier of an article that makes it possible to request it directly, without exploring the menu on the Help&Docs section of the site. This mechanism will be used to associate certain articles with the contextual help button.




Questions
- do we need the `draft` field?
- how should it be coordinated with the menu?
- do we need the `tags` field?
- it doesn't seem to have any purpose
- do we start an article with heading 1? does it need to be the same as the `title` metadata field
- do we want the two mechanisms for encoding both the relative path and the root (starting from the docs directory) path?
- can we use the yaml frontmatter to encode references?

## Article body

The body of the article. To be written in markdown. Supports CommonMark.

### Supported formatting

#### Regular markdown formatting

- paragraph
- heading (h1 to h4)
- ordered lists
- unordered lists (with 2 levels of nesting)
- links
- the ones that start with the pathname will be styled as internal links (example: `[Species selector](/species-selector)`)
- the ones that contain a protocol and a host name will be styled as external links (example: `[HGNC](https://www.genenames.org/)`)
- inlined code and code blocks
- tables (although markdown is poorly suited for tables, and it is possible you might want to use html to write them, see the next section)
- images

#### Custom formatting via html

The markdown spec allows the author to inject raw html between the paragraphs of regular markdown, which makes the following examples possible:

```md
# Example

This is a paragraph of plain markdown.

<p class="special-color">Hey, look at this! This is html in a markdown file</p>
```

The CommonMark spec even allows continuing writing markdown inside of html tags, provided there remains an empty line between the html tag and the markdown content, thus making the following use cases possible:

```md
# Example

This is a paragraph of plain markdown.

<div class="documentation-box">

## This is heading 2

And this is another paragraph, which will be displayed inside a box element.

</div>
```

Such sprinklings of html inside markdown opens up the possibility of custom formatting, such as boxes, complex tables, etc.


```
Text
Bullet-pointed lists
With indents – three levels
Numbered lists
Tables
With header
Without header
Headers
Four levels
External link
Internal link
Help app
About
Task-based
App view with example
Related contextual help
Code or command line
References
Boxes (eg http://www.ensembl.org/info/genome/variation/prediction/protein_function.html)

Images
Border
Image caption
Pointer with text
Circle/square around an item to highlight

Videos
Pointer with text
Circle/square around an item to highlight
```
Loading