Skip to content

Commit 1f3f903

Browse files
committed
Add docs and syntax tests stub
1 parent bd37dda commit 1f3f903

94 files changed

Lines changed: 11649 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.github/workflows/deploy.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build Documentation
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
# Specify to run a workflow manually from the Actions tab on GitHub
7+
workflow_dispatch:
8+
9+
# Gives the workflow permissions to clone the repo and create a page deployment
10+
permissions:
11+
id-token: write
12+
pages: write
13+
14+
env:
15+
# Name of module and id separated by a slash
16+
INSTANCE: Writerside/tl
17+
# Replace HI with the ID of the instance in capital letters
18+
ARTIFACT: webHelpTL2-all.zip
19+
# Writerside docker image version
20+
DOCKER_VERSION: '2025.04.8412'
21+
CONFIG_JSON_PRODUCT: 'TL'
22+
CONFIG_JSON_VERSION: '1.0'
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Checkout Repository
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
- name: Build Docs
34+
uses: JetBrains/writerside-github-action@v4
35+
with:
36+
instance: ${{ env.INSTANCE }}
37+
artifact: ${{ env.ARTIFACT }}
38+
docker-version: ${{ env.DOCKER_VERSION }}
39+
- name: Upload Documentation
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: docs
43+
path: |
44+
artifacts/${{ env.ARTIFACT }}
45+
artifacts/report.html
46+
artifacts/report.json
47+
artifacts/${{ env.ALGOLIA_ARTIFACT }}
48+
retention-days: 7
49+
50+
# test:
51+
# needs: build
52+
# runs-on: ubuntu-latest
53+
# steps:
54+
# - name: Download Artifacts
55+
# uses: actions/download-artifact@v4
56+
# with:
57+
# name: docs
58+
# path: artifacts
59+
# - name: Test Documentation
60+
# uses: JetBrains/writerside-checker-action@v1
61+
# with:
62+
# instance: ${{ env.INSTANCE }}
63+
64+
deploy:
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
needs: build
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Download Artifact
72+
uses: actions/download-artifact@v4
73+
with:
74+
name: docs
75+
- name: Unzip Artifact
76+
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir
77+
- name: Setup Pages
78+
uses: actions/configure-pages@v4
79+
- name: Upload Artifact
80+
uses: actions/upload-pages-artifact@v3
81+
with:
82+
path: dir
83+
- name: Deploy to GitHub Pages
84+
id: deployment
85+
uses: actions/deploy-pages@v4

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.idea
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<sitemap priority="0.35" change-frequency="monthly"/>
5+
6+
<variables>
7+
<primary-color>#4f57a7</primary-color>
8+
<link-color>#6066a2</link-color>
9+
<color-preset>contrast</color-preset>
10+
<custom-favicons>logo.svg</custom-favicons>
11+
<header-logo>logo.svg</header-logo>
12+
<product-web-url>https://typelang.dev</product-web-url>
13+
<noindex-content>false</noindex-content>
14+
<offline-docs>false</offline-docs>
15+
16+
<feedback-url>https://github.com/php-type-language/docs/issues</feedback-url>
17+
<web-root>/</web-root>
18+
<og-image>splash.png</og-image>
19+
<generate-canonicals>true</generate-canonicals>
20+
21+
<download-title>GitHub</download-title>
22+
<download-page>https://github.com/php-type-language</download-page>
23+
<showDownloadButton>true</showDownloadButton>
24+
25+
<enable-contribution>true</enable-contribution>
26+
<contribute-url>https://github.com/php-type-language/docs/blob/master/Writerside/</contribute-url>
27+
<custom-css>custom.css</custom-css>
28+
29+
<!--<algolia-id>CZXH99BXN1</algolia-id>
30+
<algolia-index>Writerside</algolia-index>
31+
<algolia-api-key>70b2d5249859c00508d22cb54c52eeee</algolia-api-key>-->
32+
</variables>
33+
34+
<icons>
35+
<local-src>icons</local-src>
36+
</icons>
37+
38+
<footer>
39+
<social href="https://github.com/php-type-language" type="github">GitHub</social>
40+
<link href="https://packagist.org/packages/type-lang/parser">Packagist</link>
41+
<link href="https://github.com/php-type-language/parser/issues">Issue tracker</link>
42+
<link href="https://github.com/php-type-language/parser/pulls">Submit request</link>
43+
<copyright>PHP TypeLang</copyright>
44+
</footer>
45+
</buildprofiles>

docs/Writerside/cfg/glossary.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE terms SYSTEM "https://resources.jetbrains.com/writerside/1.0/glossary.dtd">
3+
<terms>
4+
<term name="FQN">Fully Qualified Name</term>
5+
<term name="Identifier">A sequence that begins with a letter and contains
6+
letters, numbers, underscores, and dashes</term>
7+
<term name="publicity-or-privacy">The use of a work free of known copyright
8+
restrictions may be otherwise regulated or limited. The work or its use
9+
may be subject to personal data protection laws, publicity, image, or
10+
privacy rights that allow a person to control how their voice, image or
11+
likeness is used, or other restrictions or limitations under applicable
12+
law</term>
13+
<term name="endorsement">In some jurisdictions, wrongfully implying that an
14+
author, publisher or anyone else endorses your use of a work may be
15+
unlawful</term>
16+
<term name="normalize">Normalization: The process of "simplifying" data;
17+
Transforming from an internal "PHP Type" to a simpler "External Type"
18+
</term>
19+
<term name="denormalize">Denormalization: The process of "enriching" data;
20+
Transforming an abstract "External Type" into a more concrete "PHP Type"
21+
</term>
22+
</terms>
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,200;1,200&display=swap');
2+
3+
:root {
4+
--wh-color-accent-substrate-bg: #222330 !important;
5+
--wh-color-border-hover: #4f57a7 !important;
6+
--wh-color-backlight-pale: none;
7+
--wh-color-backlight-pale-dark: none;
8+
--app-link-color-dark: #848CD5 !important;
9+
}
10+
11+
h1, h2 {
12+
font-family: "Roboto Condensed", "JetBrains Sans Bundled", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Droid Sans", "Helvetica Neue", Arial, sans-serif !important;
13+
font-optical-sizing: auto !important;
14+
font-weight: 200 !important;
15+
font-style: normal !important;
16+
}
17+
18+
h1 {
19+
font-size: 48px !important;
20+
}
21+
22+
.wh-header__product-logo {
23+
width: 32px;
24+
height: 32px;
25+
}
26+
27+
.article > .prompt {
28+
max-width: auto !important;
29+
}
30+
31+
.prompt__wrapper {
32+
display: flex;
33+
}
34+
35+
.prompt__content {
36+
overflow: visible;
37+
}
38+
39+
.prompt__wrapper > .prompt__content {
40+
flex: 1;
41+
}
42+
43+
.app__nav {
44+
padding: 0 10px;
45+
}
46+
47+
.app__sidebar {
48+
border: none;
49+
}
50+
51+
.app__toc li {
52+
margin: 6px 0;
53+
}
54+
55+
.toc-item {
56+
border-radius: 5px;
57+
}
58+
59+
.toc-item--highlighted {
60+
background: none !important;
61+
}
62+
63+
.toc-item--theme-light:hover {
64+
background: rgba(25, 25, 28, .05) !important;
65+
background: var(--wh-color-backlight-main) !important;
66+
}
67+
68+
.toc-item--theme-dark:hover {
69+
background: hsla(0, 0%, 100%, .1) !important;
70+
background: var(--wh-color-white-t10) !important;
71+
}
72+
73+
.toc-item--selected.toc-item--theme-dark {
74+
cursor: default;
75+
background-color: #252528 !important;
76+
background-color: var(--wh-color-backlight-secondary-dark) !important;
77+
}
78+
79+
.toc-item--selected.toc-item--theme-light {
80+
cursor: default;
81+
background-color: #6b57ff !important;
82+
background-color: var(--wh-color-primary-light-theme) !important;
83+
}
84+
85+
.toc--theme-dark {
86+
background: none;
87+
}
88+
89+
.article__list + .code-block__wrapper,
90+
.article__list + .code-collapse__wrapper,
91+
p + .code-block__wrapper,
92+
p + .code-collapse__wrapper,
93+
.code-block__wrapper + .code-collapse__wrapper,
94+
.code-block__wrapper + .code-block__wrapper {
95+
margin-top: 12px !important;
96+
}
97+
98+
.starting-page-card {
99+
border-radius: 7px;
100+
}
101+
102+
.app__breadcrumbs {
103+
width: 706px;
104+
background: rgba(0, 0, 0, 0.05);
105+
border-radius: 7px;
106+
padding: 10px 0 10px 16px;
107+
}
108+
109+
html.theme-dark .app__breadcrumbs {
110+
background: rgba(255, 255, 255, 0.05);
111+
}
112+
113+
.theme-dark .starting-page-card {
114+
background: #1c2329 !important;
115+
}
116+
117+
.theme-dark .starting-page-card:hover {
118+
background: #252f37 !important;
119+
}
120+
121+
.article img {
122+
border-radius: 7px;
123+
}
124+
125+
#mermaid .flowchart-link {
126+
stroke: #4f57a7 !important;
127+
}
128+
129+
#mermaid .node polygon,
130+
#mermaid .node rect {
131+
fill: rgba(0, 0, 0, .05) !important;
132+
stroke: transparent !important;
133+
rx: 7px !important;
134+
}
135+
136+
#mermaid .divider {
137+
stroke: rgba(0, 0, 0, .1) !important;
138+
}
139+
140+
html.theme-dark #mermaid .node polygon,
141+
html.theme-dark #mermaid .node rect {
142+
fill: rgba(255, 255, 255, .05) !important;
143+
}
144+
145+
html.theme-dark #mermaid .node span {
146+
color: #a9b7c6 !important;
147+
font-size: 95%;
148+
}
149+
150+
html.theme-dark #mermaid .divider {
151+
stroke: #1c2329 !important;
152+
}
153+
154+
.code-comparer__code-line {
155+
border-radius: 3px;
156+
}

docs/Writerside/cfg/versions.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"version": "1.0",
4+
"url": "/docs/1.0",
5+
"isCurrent": false
6+
},
7+
{
8+
"version": "1.1",
9+
"url": "/docs/1.1",
10+
"isCurrent": false
11+
},
12+
{
13+
"version": "1.2",
14+
"url": "/docs/1.2",
15+
"isCurrent": true
16+
}
17+
]

docs/Writerside/icons/class.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/Writerside/icons/ko.svg

Lines changed: 4 additions & 0 deletions
Loading

docs/Writerside/icons/ok.svg

Lines changed: 4 additions & 0 deletions
Loading

docs/Writerside/icons/phan.png

536 Bytes
Loading

0 commit comments

Comments
 (0)