Skip to content

Commit

Permalink
Merge remote-tracking branch 'slub/master' into 6.x-ocr-devel
Browse files Browse the repository at this point in the history
Signed-off-by: Christos Sidiropoulos <csidirop@runbox.com>
  • Loading branch information
csidirop committed Aug 27, 2024
2 parents c340250 + 592da36 commit 93e746c
Show file tree
Hide file tree
Showing 30 changed files with 342 additions and 1,610 deletions.
2 changes: 0 additions & 2 deletions .github/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
parameters:
ignoreErrors:
- '#Call to an undefined method Kitodo\\Dlf\\Domain\\Model\\Document::getCurrentDocument\(\)\.#'
level: 5
paths:
- ../Classes/
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: test documentation

on: [ push, pull_request ]

jobs:
tests:
name: documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Test if the documentation will render without warnings
run: |
mkdir -p Documentation-GENERATED-temp \
&& docker run --rm --pull always -v $(pwd):/project \
ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log
6 changes: 3 additions & 3 deletions .github/workflows/npm-grunt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [20.x]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
uses: php-actions/composer@v6
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
node_modules
*.css.map
Documentation-GENERATED-temp/
public/
vendor/
composer.lock
2 changes: 0 additions & 2 deletions Build/Documentation/.gitignore

This file was deleted.

35 changes: 0 additions & 35 deletions Build/Documentation/conf.py

This file was deleted.

7 changes: 0 additions & 7 deletions Build/Documentation/docker-compose.t3docs.yml

This file was deleted.

55 changes: 0 additions & 55 deletions Build/Documentation/sphinx.sh

This file was deleted.

28 changes: 14 additions & 14 deletions Build/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"license": "GPL-3.0-or-later",
"homepage": "https://dfgviewer.de",
"devDependencies": {
"grunt": "^1.5.3",
"grunt": "^1.6",
"grunt-cli": "^1.5.0",
"grunt-contrib-less": "^2.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-terser": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dfgviewer_uri'] = 'layout,select_key,pages,recursive';

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Slub.Dfgviewer',
'Dfgviewer',
'Uri',
'LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.search.title',
);

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Slub.Dfgviewer',
'Dfgviewer',
'SRU',
'LLL:EXT:dfgviewer/Resources/Private/Language/locallang_be.xlf:plugins.sru.title',
);
2 changes: 0 additions & 2 deletions Configuration/TypoScript/Page/header.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ page {
includeCSS {
style = EXT:dfgviewer/Resources/Public/Css/webStyles.css
highlight = EXT:dfgviewer/Resources/Public/JavaScript/Highlight/styles/magula.css
3DViewer = EXT:dfgviewer/Resources/Public/Css/3DViewer/main.css
3DViewerSpinner = EXT:dfgviewer/Resources/Public/Css/3DViewer/spinner.css
}
includeJSFooterlibs {
jQuery = EXT:dfgviewer/Resources/Public/JavaScript/jQuery/jquery-3.6.0.min.js
Expand Down
31 changes: 22 additions & 9 deletions Configuration/TypoScript/Plugins/kitodo.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,10 @@ plugin.tx_dlf_pageview {
}

# --------------------------------------------------------------------------------------------------------------------
# 3D objects view
# embedded 3D viewer
# --------------------------------------------------------------------------------------------------------------------
plugin.tx_dlf_view3d < tt_content.list.20.dlf_view3d
plugin.tx_dlf_view3d {
pages = {$config.storagePid}
excludeOther = 0
features =
elementId = tx-dfgviewer-3d-view
fileGrpImages = THUMBS,DEFAULT
plugin.tx_dlf_embedded3dviewer < tt_content.list.20.dlf_embedded3dviewer
plugin.tx_dlf_embedded3dviewer {
}

# --------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -159,6 +154,7 @@ lib.kitodo.navigation.viewfunction {
# fulltextdownloadtool
# imagedownloadtool
# imagemanipulationtool
# modeldownloadtool
# pdfdownloadtool
# searchindocumenttool

Expand All @@ -169,6 +165,14 @@ plugin.tx_dlf_toolbox {
}
}

plugin.tx_dlf_modeldownloadtool < plugin.tx_dlf_toolbox
plugin.tx_dlf_modeldownloadtool {
settings {
fileGrpsModelDownload = DEFAULT
tools = modeldownloadtool
}
}

plugin.tx_dlf_fulltexttool < plugin.tx_dlf_toolbox
plugin.tx_dlf_fulltexttool {
settings {
Expand Down Expand Up @@ -204,9 +208,18 @@ plugin.tx_dlf_audioplayer {
}

# --------------------------------------------------------------------------------------------------------------------
# newspaper navigation
# 3d object
# --------------------------------------------------------------------------------------------------------------------
[getDocumentType({$config.storagePid}) == "object"]
page.10.variables {
is3dObject = TEXT
is3dObject.value = 1
}
[END]

# --------------------------------------------------------------------------------------------------------------------
# newspaper navigation
# --------------------------------------------------------------------------------------------------------------------
[getDocumentType({$config.storagePid}) == "ephemera" or getDocumentType({$config.storagePid}) == "newspaper"]
page.10.variables {
isNewspaper = TEXT
Expand Down
60 changes: 42 additions & 18 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,59 @@ npm run build

## Documentation

### Local Preview Server
Build the DFG-Viewer documentation using the `docs:build` script with Composer.
This script generates the documentation using the rendering tool for Typo3 and
places it in the `Documentation-GENERATED-temp` folder.

To preview the rendered output and automatically rebuild documentation on changes, you may spawn a local server. This supports auto-refresh and is faster than the official preview build, but omits some features such as syntax highlighting.
```bash
composer docs:build
```

Take a look at the documentation by opening the file `Index.html` in the folder
`Documentation-GENERATED-temp` in your browser.

### Provide via Http Server (optional)

This requires Python 2 to be installed.
Starts the http server and mounts the mandatory directory `Documentation-GENERATED-temp`.

```bash
# First start: Setup Sphinx in a virtualenv
composer docs:setup
composer docs:start
```

Take a look at the documentation by opening <http://localhost:8000>
in your browser.

The server runs in detached mode, so you will need to stop the http server manually.

# Spawn server
composer docs:serve
composer docs:serve -- -E # Don't use a saved environment (useful when changing toctree)
composer docs:serve -- -p 8000 # Port may be specified
```bash
composer docs:stop
```

By default, the output is served to http://127.0.0.1:8000.
### Troubleshooting

#### Permission

### Official Preview Build
The documentation container runs as a non-root user. If there are some problem regarding
the permission of container user you can link the UID and GID of host into the container
using the `--user` parameter.

Build documentation using the [official Docker image](https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/RenderingDocs/Quickstart.html):
**Example:**

```bash
# Full build
composer docs:t3 makehtml
docker run --rm --user=$(id -u):$(id -g) [...]
```

_In the `docs:build` Composer script, this parameter is already included.
If any issues arise, you can adjust or remove it as needed._

# Only run sphinx-build
composer docs:t3 just1sphinxbuild
#### Output directory

# (Alternative) Run docker-compose manually
docker-compose -f ./Build/Documentation/docker-compose.t3docs.yml run --rm t3docs makehtml
The default documentation directory name is `Documentation-GENERATED-temp`.
If you want to change the directory name add the `--output` parameter at the
end of the building command.

**Example:**

```bash
[...] --config ./Documentation --output="My_Documentation_Directory"
```
Loading

0 comments on commit 93e746c

Please sign in to comment.