Skip to content

Commit

Permalink
fix: Fixed broken documentation links (#14023)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlqn authored Nov 12, 2024
1 parent 70f1511 commit ceeaae8
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ See also the [list of contributors][26] who participated in this project.
This project is licensed under the 3-Clause BSD License - see the [LICENSE.md](LICENSE.md) file for details.

[1]: https://docs.altinn.studio/
[2]: https://docs.altinn.studio/app/getting-started/
[3]: https://docs.altinn.studio/app/app-dev-course/
[2]: https://docs.altinn.studio/altinn-studio/getting-started/
[3]: https://docs.altinn.studio/altinn-studio/getting-started/app-dev-course/
[4]: https://github.com/Altinn/app-localtest
[5]: https://dotnet.microsoft.com/download/dotnet/8.0
[6]: https://nodejs.org
Expand Down
2 changes: 1 addition & 1 deletion backend/src/Designer/Views/Home/StartPage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<div class="a-collapseContent-inside ">
<div class="mt-1">
<p>For å logge inn må du først lage en bruker. Se mer om hvordan komme i gang i
<a href="https://docs.altinn.studio/app/getting-started/">brukerdokumentasjonen
<a href="https://docs.altinn.studio/altinn-studio/getting-started/">brukerdokumentasjonen
til
Altinn Studio</a>.
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Link } from '@digdir/designsystemet-react';
import { EmailContactProvider } from 'app-shared/getInTouch/providers';
import { GetInTouchWith } from 'app-shared/getInTouch';
import { StudioError, StudioPageSpinner } from '@studio/components';
import { altinnDocsUrl } from 'app-shared/ext-urls';

export function DeployPage() {
const { org, app } = useStudioEnvironmentParams();
Expand Down Expand Up @@ -42,7 +43,11 @@ export function DeployPage() {
</div>
<div style={{ paddingTop: '2.4rem' }}>
<Trans i18nKey={'app_deployment.no_env_2'}>
<a target='_new' rel='noopener noreferrer' />
<a
href={altinnDocsUrl({ relativeUrl: 'altinn-studio/reference/testing/local/' })}
target='_new'
rel='noopener noreferrer'
/>
</Trans>
</div>
</InfoCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { AlertProps } from '@digdir/designsystemet-react';
import { Alert, Heading, Paragraph } from '@digdir/designsystemet-react';
import { EmailContactProvider } from 'app-shared/getInTouch/providers';
import { GetInTouchWith } from 'app-shared/getInTouch';
import { altinnDocsUrl } from 'app-shared/ext-urls';

type NoEnvironmentsAlertProps = AlertProps;
export const NoEnvironmentsAlert = ({ ...rest }: NoEnvironmentsAlertProps) => {
Expand All @@ -22,7 +23,11 @@ export const NoEnvironmentsAlert = ({ ...rest }: NoEnvironmentsAlertProps) => {
</Paragraph>
<Paragraph>
<Trans i18nKey='app_deployment.no_env_2'>
<a target='_new' rel='noopener noreferrer' />
<a
href={altinnDocsUrl({ relativeUrl: 'altinn-studio/reference/testing/local/' })}
target='_new'
rel='noopener noreferrer'
/>
</Trans>
</Paragraph>
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import classes from './Documentation.module.css';
import { Heading, Link } from '@digdir/designsystemet-react';
import { ExternalLinkIcon } from '@studio/icons';
import { useTranslation } from 'react-i18next';
import { altinnDocsUrl } from 'app-shared/ext-urls';

export const Documentation = (): React.ReactElement => {
const { t } = useTranslation();
Expand All @@ -12,7 +13,7 @@ export const Documentation = (): React.ReactElement => {
{t('overview.documentation.title')}
</Heading>
<Link
href='https://docs.altinn.studio/nb/app/getting-started/create-app/'
href={altinnDocsUrl({ relativeUrl: 'altinn-studio/getting-started/' })}
className={classes.link}
>
<span>{t('overview.documentation.link')}</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ReactNode } from 'react';
import React from 'react';
import classes from './AccessControlTab.module.css';
import { Trans, useTranslation } from 'react-i18next';
import { useTranslation } from 'react-i18next';
import { TabHeader } from '../../TabHeader';
import { ErrorMessage, HelpText, Link, Paragraph } from '@digdir/designsystemet-react';
import { LoadingTabData } from '../../LoadingTabData';
Expand All @@ -10,6 +10,7 @@ import { TabContent } from '../../TabContent';
import { SelectAllowedPartyTypes } from './SelectAllowedPartyTypes';
import { useStudioEnvironmentParams } from 'app-shared/hooks/useStudioEnvironmentParams';
import { useAppMetadataQuery } from 'app-shared/hooks/queries';
import { altinnDocsUrl } from 'app-shared/ext-urls';

export const AccessControlTab = (): ReactNode => {
const { t } = useTranslation();
Expand Down Expand Up @@ -62,9 +63,9 @@ export const AccessControlTab = (): ReactNode => {
<span className={classes.docsLinkText}>
{t('settings_modal.access_control_tab_option_access_control_docs_link_text')}
</span>
<Trans i18nKey={'settings_modal.access_control_tab_option_access_control_docs_link'}>
<Link>documentation</Link>
</Trans>
<Link href={altinnDocsUrl({ relativeUrl: 'altinn-studio/reference/logic/instantiation' })}>
{t('settings_modal.access_control_tab_option_access_control_docs_link')}
</Link>
</TabContent>
);
};
3 changes: 2 additions & 1 deletion frontend/dashboard/components/Resources/Resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ResourceItem } from '../ResourceItem';
import classes from './Resources.module.css';
import { useTranslation } from 'react-i18next';
import { StudioHeading } from '@studio/components';
import { altinnDocsUrl } from 'app-shared/ext-urls';

interface Resource {
label: string;
Expand Down Expand Up @@ -155,7 +156,7 @@ const resources: Resource[] = [
{
label: 'dashboard.resource_roadmap_label',
description: 'dashboard.resource_roadmap_description',
url: 'https://docs.altinn.studio/nb/community/roadmap/',
url: altinnDocsUrl({ relativeUrl: 'community/roadmap/' }),
icon: (
<svg
width='60'
Expand Down
2 changes: 1 addition & 1 deletion frontend/language/src/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"app_data_modelling.uploading_xsd": "Uploading XSD...",
"app_deployment.missing_rights": "You do not have permissions to deploy to the {{envName}} environment. Permissions can be granted by owners in {{orgName}}.",
"app_deployment.no_env_1": "To create environments, so you can test and deploy to production, please contact <0>Altinn servicedesk</0>. Please specify organization name and which environments you want access to.",
"app_deployment.no_env_2": "Until a test environment is ready, remember that you can test an application <0 href=\"https://docs.altinn.studio/app/testing/local/\">locally</0>.",
"app_deployment.no_env_2": "Until a test environment is ready, remember that you can test an application <0>locally</0>.",
"app_deployment.no_env_title": "Your organization has not ordered access to test- and production environments.",
"app_deployment.no_team": "You do not belong to any team in your organisation.",
"app_deployment.no_team_info": "In order to get access to deploy your application to an environment you need to be added to a team that has deploy access to that specific environment.",
Expand Down
4 changes: 2 additions & 2 deletions frontend/language/src/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"app_deployment.loading": "Laster inn statusen og aktiviteten for denne appen...",
"app_deployment.missing_rights": "Du har ikke rettigheter til å publisere til {{envTitle}}. Be eierne i {{orgName}} om å gi deg tilgang.",
"app_deployment.no_env_1": "For å opprette miljøer som du kan teste og produksjonssette i, må du ta kontakt med <0>Altinn servicedesk</0>. Det er viktig at du oppgir organisasjonsnavnet og hvilke miljøer du vil ha tilgang til.",
"app_deployment.no_env_2": "Fram til et miljø er på plass, husk at du kan gjøre mye <0 href=\"https://docs.altinn.studio/app/testing/local/\">testing lokalt</0> eller i forhåndsvisningen i Altinn Studio.",
"app_deployment.no_env_2": "Fram til et miljø er på plass, husk at du kan gjøre mye <0>testing lokalt</0> eller i forhåndsvisningen i Altinn Studio.",
"app_deployment.no_env_title": "Din organisasjon har ikke noe test- og produksjonsmiljø",
"app_deployment.no_team": "Du tilhører ikke noe team i organisasjonen din.",
"app_deployment.no_team_info": "For å kunne publisere appen din til et miljø, må du være lagt til i et team som har publiseringsrettigheter til det bestemte miljøet.",
Expand Down Expand Up @@ -966,7 +966,7 @@
"settings_modal.access_control_tab_heading": "Oppstartskontroll for appen",
"settings_modal.access_control_tab_help_text_heading": "I oppstartskontrollen velger du hva som skal kontrolleres når appen starter.",
"settings_modal.access_control_tab_help_text_title": "Hjelpetekst for oppstartskontroll",
"settings_modal.access_control_tab_option_access_control_docs_link": "<0 href=\"https://docs.altinn.studio/app/development/logic/instantiation\">I dokumentasjonen kan du lære hvordan du setter andre kontroller for oppstart.</0>",
"settings_modal.access_control_tab_option_access_control_docs_link": "I dokumentasjonen kan du lære hvordan du setter andre kontroller for oppstart.",
"settings_modal.access_control_tab_option_access_control_docs_link_text": "Velg eller lag andre tilleggskontroller:",
"settings_modal.access_control_tab_option_all_types": "Alle typer",
"settings_modal.access_control_tab_option_bankruptcy_estate": "Konkursbo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const OldDynamicsInfo = () => {
<br />
<Link
className={classes.externalLink}
href={altinnDocsUrl({ relativeUrl: '/app/development/logic/dynamic/' })}
href={altinnDocsUrl({ relativeUrl: 'altinn-studio/reference/logic/dynamic/' })}
rel='noopener noreferrer'
target='_blank'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useText } from '../../../../hooks';
import type { IGenericEditComponent } from '../../componentConfig';
import { FormField } from '../../../FormField';
import { StudioNativeSelect } from '@studio/components';
import { altinnDocsUrl } from 'app-shared/ext-urls';

export const ImageComponent = ({
component,
Expand Down Expand Up @@ -133,7 +134,7 @@ export const ImageComponent = ({
<a
target='_blank'
rel='noopener noreferrer'
href='https://docs.altinn.studio/nb/app/development/ux/components/images/'
href={altinnDocsUrl({ relativeUrl: 'altinn-studio/reference/ux/components/image/' })}
>
{t('ux_editor.modal_properties_image_read_more')}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function EditCodeList({ component, handleComponentChange }: IGenericEditC
<p style={{ marginBottom: 0 }}>
<Trans i18nKey={'ux_editor.modal_properties_code_list_read_more'}>
<a
href={altinnDocsUrl({ relativeUrl: 'app/development/data/options/' })}
href={altinnDocsUrl({ relativeUrl: 'altinn-studio/reference/data/options/' })}
target='_newTab'
rel='noopener noreferrer'
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const DeprecatedCalculationsInfo = () => {
{t('right_menu.rules_calculations_deprecated_info')}
</StudioParagraph>
<StudioLink
href={altinnDocsUrl({ relativeUrl: '/app/development/logic/dynamic/' })}
href={altinnDocsUrl({ relativeUrl: 'altinn-studio/reference/logic/dynamic/' })}
rel='noopener noreferrer'
target='_blank'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const OldDynamicsInfo = () => {
<br />
<Link
className={classes.externalLink}
href={altinnDocsUrl({ relativeUrl: '/app/development/logic/dynamic/' })}
href={altinnDocsUrl({ relativeUrl: 'altinn-studio/reference/logic/dynamic/' })}
rel='noopener noreferrer'
target='_blank'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { IGenericEditComponent } from '../../componentConfig';
import { FormField } from '../../../FormField';
import type { ComponentType } from 'app-shared/types/ComponentType';
import { StudioNativeSelect } from '@studio/components';
import { altinnDocsUrl } from 'app-shared/ext-urls';

export const ImageComponent = ({
component,
Expand Down Expand Up @@ -95,7 +96,7 @@ export const ImageComponent = ({
<a
target='_blank'
rel='noopener noreferrer'
href='https://docs.altinn.studio/nb/app/development/ux/components/images/'
href={altinnDocsUrl({ relativeUrl: 'altinn-studio/reference/ux/components/image/' })}
>
{t('ux_editor.modal_properties_image_read_more')}
</a>
Expand Down
6 changes: 5 additions & 1 deletion frontend/resourceadm/pages/MigrationPage/MigrationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
import { useUrlParams } from '../../hooks/useUrlParams';
import { getAvailableEnvironments } from '../../utils/resourceUtils';
import { MigrationPanel } from '../../components/MigrationPanel';
import { altinnDocsUrl } from 'app-shared/ext-urls';

export type MigrationPageProps = {
id: string;
Expand Down Expand Up @@ -65,7 +66,10 @@ export const MigrationPage = ({
<strong>{t('resourceadm.migration_ingress_warning')} </strong>
<Link
className={classes.migrationLink}
href='https://docs.altinn.studio/nb/authorization/what-do-you-get/resourceregistry/migration/#migrering-av-rettigheter'
href={altinnDocsUrl({
relativeUrl:
'authorization/what-do-you-get/resourceregistry/migration/#migrering-av-rettigheter',
})}
rel='noopener noreferrer'
target='_blank'
>
Expand Down
2 changes: 1 addition & 1 deletion src/test/K6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The dependencies are for linting and formatting of the test scripts.
yarn run prettier:format # Fix and save the files based on configuration
```

Refer this page for more [documentation](https://docs.altinn.studio/technology/altinnstudio/development/handbook/test/k6/) on how to write new test scripts.
Refer this page for more [documentation](https://docs.altinn.studio/community/contributing/handbook/test/k6/) on how to write new test scripts.

## Run Tests

Expand Down
2 changes: 1 addition & 1 deletion testdata/AppTemplates/AspNet/deployment/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Additional configurations are available. See: https://docs.altinn.studio/app/development/configuration/deployment/
# Additional configurations are available. See: https://docs.altinn.studio/altinn-studio/reference/configuration/deployment/

deployment:

Expand Down

0 comments on commit ceeaae8

Please sign in to comment.