[READ-ONLY] Mirror of https://github.com/danielroe/ripple-framework. Ripple is the presentation layer for building websites on the DPC Single Digital Presence platform.
0

Configure Feed

Select the types of activity you want to include in your feed.

refactor: :recycle: reorganise baseurl

+70 -49
+3 -3
examples/nuxt-app/.example.env
··· 1 - NUXT_PUBLIC_TIDE_CONTENT_API_BASE_URL=https://develop.content.reference.sdp.vic.gov.au/ 2 - NUXT_PUBLIC_TIDE_CONTENT_API_SITE=8888 3 - # NUXT_PUBLIC_TIDE_CONTENT_API_SITE=8936 1 + NUXT_PUBLIC_TIDE_BASE_URL=https://develop.content.reference.sdp.vic.gov.au/ 2 + NUXT_PUBLIC_TIDE_SITE=8888 3 + # NUXT_PUBLIC_TIDE_SITE=8936 4 4 LOG_LEVEL=debug
+4 -6
examples/nuxt-app/nuxt.config.ts
··· 4 4 public: { 5 5 API_URL: '', 6 6 tide: { 7 - contentApi: { 8 - // These can be overridden via environment variables eg: NUXT_PUBLIC_TIDE_CONTENT_API_BASE_URL 9 - // See https://nuxt.com/docs/api/configuration/nuxt-config#runtimeconfig for more info 10 - baseUrl: 'https://develop.content.reference.sdp.vic.gov.au', 11 - site: '8888' 12 - }, 7 + // These can be overridden via environment variables eg: NUXT_PUBLIC_TIDE_BASE_URL 8 + // See https://nuxt.com/docs/api/configuration/nuxt-config#runtimeconfig for more info 9 + baseUrl: 'https://develop.content.reference.sdp.vic.gov.au', 10 + site: '8888', 13 11 appSearch: { 14 12 searchKey: '', 15 13 endpointBase: '',
+5 -7
packages/nuxt-ripple-cli/src/commands/init/_templates/new/latest/nuxt.config.ts.t
··· 8 8 public: { 9 9 API_URL: '', 10 10 tide: { 11 - contentApi: { 12 - // NOTE: These are default values and can be left as is. 13 - // These can be overridden via environment variables eg: NUXT_PUBLIC_TIDE_CONTENT_API_BASE_URL and NUXT_PUBLIC_TIDE_CONTENT_API_SITE instead 14 - // See https://nuxt.com/docs/api/configuration/nuxt-config#runtimeconfig for more info 15 - baseUrl: 'https://develop.content.reference.sdp.vic.gov.au/', 16 - site: '8888' 17 - }, 11 + // NOTE: These are default values and can be left as is. 12 + // These can be overridden via environment variables eg: NUXT_PUBLIC_TIDE_CONTENT_API_BASE_URL and NUXT_PUBLIC_TIDE_CONTENT_API_SITE instead 13 + // See https://nuxt.com/docs/api/configuration/nuxt-config#runtimeconfig for more info 14 + baseUrl: 'https://develop.content.reference.sdp.vic.gov.au/', 15 + site: '8888', 18 16 appSearch: { 19 17 searchKey: '', 20 18 endpointBase: '',
+29 -10
packages/nuxt-ripple/components/TideContentPage.vue
··· 1 1 <template> 2 - <slot v-if="page && site" :name="`${componentName}Page`" v-bind="{ page, site }"> 2 + <slot 3 + v-if="page && site" 4 + :name="`${componentName}Page`" 5 + v-bind="{ page, site }" 6 + > 3 7 <component :is="`${componentName}`" :page="page" :site="site"> 4 8 <template #sidebar> 5 9 <slot name="aboveSidebar"></slot> 6 10 <slot v-if="page.sidebar" name="sidebar"> 7 - <TideSidebarSiteSectionNav v-if="page.sidebar.siteSectionNav" :nav="page.sidebar.siteSectionNav" /> 8 - <TideSidebarRelatedLinks v-if="page.sidebar.relatedLinks?.length" title="Related links" 9 - :items="page.sidebar.relatedLinks" /> 10 - <TideSidebarRelatedLinks v-if="page.sidebar.whatsNext?.length" title="What's next" 11 - :items="page.sidebar.whatsNext" /> 12 - <TideSidebarContactUs v-if="page.sidebar.contacts?.length" :contacts="page.sidebar.contacts" /> 13 - <TideSidebarSocialShare v-if="page.sidebar.socialShareNetworks?.length" 14 - :networks="page.sidebar.socialShareNetworks" :page-title="page.title" /> 11 + <TideSidebarSiteSectionNav 12 + v-if="page.sidebar.siteSectionNav" 13 + :nav="page.sidebar.siteSectionNav" 14 + /> 15 + <TideSidebarRelatedLinks 16 + v-if="page.sidebar.relatedLinks?.length" 17 + title="Related links" 18 + :items="page.sidebar.relatedLinks" 19 + /> 20 + <TideSidebarRelatedLinks 21 + v-if="page.sidebar.whatsNext?.length" 22 + title="What's next" 23 + :items="page.sidebar.whatsNext" 24 + /> 25 + <TideSidebarContactUs 26 + v-if="page.sidebar.contacts?.length" 27 + :contacts="page.sidebar.contacts" 28 + /> 29 + <TideSidebarSocialShare 30 + v-if="page.sidebar.socialShareNetworks?.length" 31 + :networks="page.sidebar.socialShareNetworks" 32 + :page-title="page.title" 33 + /> 15 34 </slot> 16 35 <slot name="belowSidebar"></slot> 17 36 </template> ··· 27 46 28 47 const route = useRoute() 29 48 const { public: config } = useRuntimeConfig() 30 - const siteId = config.tide?.contentApi.site 49 + const siteId = config.tide?.site 31 50 32 51 const { data: site, error: siteError } = await useFetch('/api/tide/site', { 33 52 baseURL: config.API_URL || '',
+1 -1
packages/nuxt-ripple/composables/use-tide-image.ts
··· 4 4 // @ts-ignore Nuxt auto import 5 5 const config = useRuntimeConfig() 6 6 return computed( 7 - () => `${config.tide.contentApi.baseUrl.slice(0, -1)}${src}?width=${width}` 7 + () => `${config.tide.baseUrl.slice(0, -1)}${src}?width=${width}` 8 8 ) 9 9 }
+2 -2
packages/nuxt-ripple/nuxt.config.ts
··· 4 4 runtimeConfig: { 5 5 public: { 6 6 tide: { 7 + baseUrl: 'https://develop.content.reference.sdp.vic.gov.au', 8 + site: '8888', 7 9 config: { 8 - baseUrl: 'https://develop.content.reference.sdp.vic.gov.au', 9 - site: '8888', 10 10 apiPrefix: '/api/v1', 11 11 auth: { 12 12 username: 'dpc',
+1 -1
packages/nuxt-ripple/pages/sitemap.vue
··· 9 9 import { useRuntimeConfig, useFetch, createError } from '#imports' 10 10 11 11 const { public: config } = useRuntimeConfig() 12 - const siteId = config.tide?.contentApi.site 12 + const siteId = config.tide?.site 13 13 14 14 const { data: site, error: siteError } = await useFetch('/api/tide/site', { 15 15 baseURL: config.API_URL || '',
+8 -2
packages/ripple-tide-api/src/services/__test__/tide-api-base.test.ts
··· 18 18 test: 'field' 19 19 } 20 20 } 21 + 22 + const exampleApiConnection = { 23 + site: '123', 24 + baseUrl: '' 25 + } 26 + 21 27 const exampleApiConfig = { 22 - site: '123', 23 - baseUrl: '', 24 28 apiPrefix: '/api/v1' 25 29 } 26 30 ··· 28 32 describe('getMappedData', () => { 29 33 const tideApiBase = new TideApiBase( 30 34 { 35 + ...exampleApiConnection, 31 36 debug: false, 32 37 config: exampleApiConfig, 33 38 mapping: { ··· 73 78 describe('get', () => { 74 79 const tideApiBase = new TideApiBase( 75 80 { 81 + ...exampleApiConnection, 76 82 config: exampleApiConfig, 77 83 debug: false, 78 84 mapping: {
+1 -1
packages/ripple-tide-api/src/services/tide-api-base.ts
··· 15 15 super( 16 16 { 17 17 client: tide.client, 18 - baseUrl: `${tide.config.baseUrl}${tide.config.apiPrefix}`, 18 + baseUrl: `${tide.baseUrl}${tide.config.apiPrefix}`, 19 19 auth: tide.config.auth 20 20 }, 21 21 logger
+1 -1
packages/ripple-tide-api/src/services/tide-page.ts
··· 22 22 23 23 constructor(tide: RplTideModuleConfig, logger: ILogger) { 24 24 super(tide, logger) 25 - this.site = tide.config.site 25 + this.site = tide.site 26 26 this.sectionId = '' 27 27 this.path = '' 28 28 this.contentTypes = {}
+1 -1
packages/ripple-tide-api/src/services/tide-site.ts
··· 14 14 logger: ILogger 15 15 ) { 16 16 super(tide, logger) 17 - this.site = tide.config.site 17 + this.site = tide.site 18 18 this.siteMapping = null 19 19 this.logLabel = 'TideSite' 20 20 }
+11 -11
packages/ripple-tide-api/types.d.ts
··· 140 140 } 141 141 142 142 export interface RplTideModuleConfig { 143 + /** 144 + * Site taxonomy id or name 145 + */ 146 + site: string 147 + /** 148 + * URL of Tide Content Repository 149 + */ 150 + baseUrl: string 151 + /** 152 + * Basic Auth credentials 153 + */ 143 154 config: { 144 - /** 145 - * Site taxonomy id or name 146 - */ 147 - site: string 148 - /** 149 - * URL of Tide Content Repository 150 - */ 151 - baseUrl: string 152 - /** 153 - * Basic Auth credentials 154 - */ 155 155 auth?: { 156 156 username: string 157 157 password: string
+1 -1
packages/ripple-tide-landing-page/components/global/TideLandingPage/WebForm.vue
··· 59 59 baseURL: config.API_URL || '', 60 60 body, 61 61 params: { 62 - site: config.tide.contentApi.site 62 + site: config.tide.site 63 63 }, 64 64 headers: { 65 65 'Content-Type': 'application/vnd.api+json;charset=UTF-8'
+1 -1
packages/ripple-tide-publication/server/api/tide/publication-index.ts
··· 44 44 45 45 constructor(tide: RplTideModuleConfig, logger: ILogger) { 46 46 super(tide, logger) 47 - this.siteId = tide.config.site 47 + this.siteId = tide.site 48 48 this.publicationMapping = { 49 49 mapping: { 50 50 _src: (src: any) =>
+1 -1
packages/ripple-tide-search/components/TideSearchPage.vue
··· 53 53 54 54 const route = useRoute() 55 55 const { public: config } = useRuntimeConfig() 56 - const siteId = config.tide?.contentApi.site 56 + const siteId = config.tide?.site 57 57 58 58 const { data: site } = useFetch('/api/tide/site', { 59 59 baseURL: config.API_URL || '',