Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation integration #58

Merged
merged 48 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c85200f
update script to use the package docs
KirillDogadin-std Jun 29, 2023
1c7846f
update documentation
KirillDogadin-std Jun 29, 2023
a8cf9c9
dont create dir if exists
KirillDogadin-std Jun 29, 2023
3d7a62a
useless import
KirillDogadin-std Jun 29, 2023
b6bff03
genearate docs with version file
KirillDogadin-std Jun 29, 2023
af4c90d
generate docs on postinstall
KirillDogadin-std Jun 29, 2023
592af63
add postupdate hook
KirillDogadin-std Jun 29, 2023
1e220ac
docker-compose doc integration
KirillDogadin-std Jun 29, 2023
4b95a17
lint
KirillDogadin-std Jun 29, 2023
1570167
readme update
KirillDogadin-std Jun 29, 2023
acedb4e
add the docs page to gitignore
KirillDogadin-std Jun 29, 2023
12bf183
more pre hooks
KirillDogadin-std Jun 29, 2023
51e24d0
update readme
KirillDogadin-std Jun 29, 2023
dcfdf8e
handle missing package in the script
KirillDogadin-std Jun 29, 2023
ce5ae0c
lint
KirillDogadin-std Jun 29, 2023
986436f
fix lint
KirillDogadin-std Jun 29, 2023
7ce1bb3
typo
KirillDogadin-std Jun 29, 2023
8228ecd
use package name in the docs dir computation
KirillDogadin-std Jun 29, 2023
67440b5
add documentation version tag
KirillDogadin-std Jun 29, 2023
d52b5f6
gitignore temp
KirillDogadin-std Jun 29, 2023
943935c
rm files
KirillDogadin-std Jun 29, 2023
bbb64a5
Revert "gitignore temp"
KirillDogadin-std Jun 29, 2023
ca00248
Update frontend/scripts/generateDocs.ts
KirillDogadin-std Jun 29, 2023
c18a48f
update version along with the overwriting docs only
KirillDogadin-std Jun 29, 2023
3cabce0
gitignore
KirillDogadin-std Jun 29, 2023
38ac35e
gitignore
KirillDogadin-std Jun 29, 2023
8ec1d38
account for undefined version of docs
KirillDogadin-std Jun 29, 2023
b4f0ff9
lint
KirillDogadin-std Jun 29, 2023
513d6c8
fix the position of the documentation label
KirillDogadin-std Jul 3, 2023
af1e80e
background grey
KirillDogadin-std Jul 3, 2023
dd3e794
Merge branch 'main' into improve-doc-integration
KirillDogadin-std Jul 3, 2023
eac1060
display doc version notification out of the whitebox on the gray outs…
KirillDogadin-std Jul 3, 2023
495858f
make the documentatino version text gray
KirillDogadin-std Jul 3, 2023
af2a4d5
improve spacing
KirillDogadin-std Jul 3, 2023
b862be2
improve the punctuation
KirillDogadin-std Jul 3, 2023
5db043f
dependency in the api
KirillDogadin-std Jul 3, 2023
da7a554
dependency in the api
KirillDogadin-std Jul 3, 2023
4a4c4f4
make the docs generated prebuild and adjust docker to install the dep…
KirillDogadin-std Jul 3, 2023
ee6d292
skip doc generation if no package found
KirillDogadin-std Jul 3, 2023
a116910
exit if no dependency is found
KirillDogadin-std Jul 3, 2023
6a94180
adjust exit code
KirillDogadin-std Jul 3, 2023
75ccbd9
ok less flex more 1d programming
KirillDogadin-std Jul 3, 2023
fa7c7a2
wip: address review
KirillDogadin-std Jul 6, 2023
b92b822
fix: path resolves
KirillDogadin-std Jul 6, 2023
ed3aa1e
darn docker ignore
KirillDogadin-std Jul 6, 2023
eda7ede
add explainer comment to the generate doc script
KirillDogadin-std Jul 6, 2023
b5c5c5c
improve root .dockerignore file
valiafetisov Jul 6, 2023
deb4368
more dockerignored folders
valiafetisov Jul 6, 2023
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
1 change: 1 addition & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ npm-debug*
dist
tests
.output
./content/documentation/**
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ node_modules
.env
dist
*.sqlite
./content/documentation/**
1 change: 1 addition & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /app/frontend
# copy the app, note .dockerignore
COPY frontend/package.json .
COPY frontend/package-lock.json .
COPY frontend/scripts ./scripts
RUN npm ci

FROM dependency-base AS production-base
Expand Down
11 changes: 9 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,15 @@ Endpoint available at `/healthz` path. Provides response if frontend is currentl
## Documentation page

One of the frontend's features is displaying the documentation about document model.
The documentation is provided to the service externally as raw typedoc output in markdown format.
The documentation is provided to the service externally as part of the npm package.

To display the documentation on the frontend the provided data has to be processed and represented in the form of a single file.

TODO: add the precise process in separate issue
The documentation gets updated or generated along with the package initially containing it: on install or update (postinstall and postupdate hooks).
The documentation gets updated or generated before `npm run dev` and `npm run start`.
valiafetisov marked this conversation as resolved.
Show resolved Hide resolved

To run the generation, use the following command:

```sh
$ npm run generateDocs
```
valiafetisov marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 4 additions & 1 deletion frontend/components/layout/TheMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ import {
Play24Regular
} from '@vicons/fluent'

const config = useRuntimeConfig()
const version = config.public.DOCUMENTATION_VERSION

const links = [
{
id: '/documentation',
icon: DocumentText24Regular,
label: 'Documentation'
label: `Documentation v${version}`
valiafetisov marked this conversation as resolved.
Show resolved Hide resolved
},
{
id: '/user',
Expand Down
1 change: 1 addition & 0 deletions frontend/content/documentation/.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.15
Loading