• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

scriptype / writ-cms / 14434185121
38%

Build:
DEFAULT BRANCH: master
Ran 13 Apr 2025 11:03PM UTC
Jobs 9
Files 108
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Apr 2025 10:33PM UTC coverage: 75.454% (-0.7%) from 76.147%
14434185121

push

github

scriptype
[CM2] Introduce deep categorization

This is a combination of 3 commits. Brace yourself.

For now the taxonomy depth is max 3. Because why not.

This required looking up to parent context for content modelling
information, instead of reaching out to the collection. So, throughout
the depth of the taxonomy, content modelling can manipulate the cascade.

To achieve that, the context object is converted into a stack. An
ImmutableStack class is used to pop() it without worrying. It has a
throwUntil() to dig the stack until reaching a point of interest (for
example digging the context to find a collection). That was needed to
avoid passing post and category contexts to tags, as tags don't carry a
hierarchial-relationship in respect to them.

Now, each subCategory can define content-modelling attributes in its
index file. Therefore, each subCategory can have a custom indexFileName
and custom names for its subCategories and posts. For example:

Demos (collection contentType: DemoPortfolio)
  - CSS (category contentType: Technology)
    + CSS-Only (category contentType: Technique)
    + Sliding Doors (category contentType: Technique)
  - Three.js
  - Whatever

The easiest way to deal with rendering subCategories was to merge
the rendering counterpart of models into the models themselves. So,
now, in addition to match() and create(), there's a render(). The render()
is pretty scrappy for now and probably needs more thinking. One of the
main ideas in this implementation is to nest the rendering of the
model's child entities (e.g. for a category, rendering of subCategories,
posts, attachments) into the models' render(). When root render()s,
render flows downstream from there. So, CM2's rendering counterpart is
now only the renderer itself, there's no more views.

Invent something called 'levelPosts' in Category. It contains only the
posts belonging to the category's specific depth. The regular 'posts'
field contains all posts downstream. This was particularly ne... (continued)

483 of 756 branches covered (63.89%)

Branch coverage included in aggregate %.

60 of 161 new or added lines in 13 files covered. (37.27%)

2259 of 2878 relevant lines covered (78.49%)

327.66 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
81.82
11.23% src/compiler/contentModel2/models/attachment.js
2
35.29
-2.21% src/compiler/contentModel2/models/asset.js
2
81.25
-18.75% src/compiler/index.js
3
66.67
src/lib/ImmutableStack.js
6
70.0
-17.5% src/compiler/contentModel2/models/homepage.js
9
56.41
-14.56% src/compiler/contentModel2/models/subpage.js
10
59.52
-29.37% src/compiler/contentModel2/models/collection/post.js
10
40.0
-60.0% src/compiler/contentModel2/models/collection/tag.js
12
76.51
-6.45% src/compiler/contentModel2/models/collection/index.js
18
44.14
-4.84% src/compiler/contentModel2/index.js
28
62.16
-17.33% src/compiler/contentModel2/models/collection/category.js
Jobs
ID Job ID Ran Files Coverage
1 14434185121.1 13 Apr 2025 11:03PM UTC 108
75.43
GitHub Action Run
2 14434185121.2 13 Apr 2025 11:03PM UTC 108
75.43
GitHub Action Run
3 14434185121.3 13 Apr 2025 11:03PM UTC 108
75.43
GitHub Action Run
4 14434185121.4 13 Apr 2025 11:03PM UTC 108
75.43
GitHub Action Run
5 14434185121.5 13 Apr 2025 11:03PM UTC 108
75.43
GitHub Action Run
6 14434185121.6 13 Apr 2025 11:03PM UTC 108
75.43
GitHub Action Run
7 14434185121.7 13 Apr 2025 11:04PM UTC 108
75.43
GitHub Action Run
8 14434185121.8 13 Apr 2025 11:04PM UTC 108
75.43
GitHub Action Run
9 14434185121.9 13 Apr 2025 11:04PM UTC 108
75.43
GitHub Action Run
Source Files on build 14434185121
  • Tree
  • List 108
  • Changed 107
  • Source Changed 107
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #14434185121
  • eea716a1 on github
  • Prev Build on master (#14370824687)
  • Next Build on master (#14434359401)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc