Skip to content

Commit 62be687

Browse files
authored
Merge pull request #21 from contentstack/feat/ECO-280-added-sitemap
feat:added sitemap [ECO-280]
2 parents 8bb3d16 + 865d989 commit 62be687

File tree

9 files changed

+8240
-1667
lines changed

9 files changed

+8240
-1667
lines changed

.env.local.sample

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ CONTENTSTACK_API_HOST=
1212
CONTENTSTACK_APP_HOST=
1313
CONTENTSTACK_LIVE_PREVIEW=true
1414

15+
#site-map
16+
NEXT_PUBLIC_HOSTED_URL=http://localhost:3000
17+
# Requires host url for sitemap. Localhost:3000 is set as default value
18+
1519
# For enabling live editing tags for this project set NEXT_PUBLIC_CONTENTSTACK_LIVE_PREVIEW=true by default it is set to false
1620
# For NA region add CONTENTSTACK_APP_HOST=app.contentstack.com
1721
# For EU region add CONTENTSTACK_APP_HOST=eu-app.contentstack.com
1822
# For setting region add CONTENTSTACK_REGION=(Optional for US region) Eg- eu
19-
# For setting custom host add CONTENTSTACK_API_HOST=for(NA: api.contentstack.io, EU: eu-api.contentstack.com)
23+
# For setting custom host add CONTENTSTACK_API_HOST=for(NA: api.contentstack.io, EU: eu-api.contentstack.com)

.eslintrc.js

Lines changed: 0 additions & 46 deletions
This file was deleted.

.eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "next/core-web-vitals",
3+
"rules": {
4+
"@next/next/no-page-custom-font":"off",
5+
"@next/next/no-sync-scripts":"off",
6+
"@next/next/no-img-element":"off",
7+
"react-hooks/exhaustive-deps":"off",
8+
"import/no-anonymous-default-export":"off"
9+
}
10+
}

helper/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ export const getFooterRes = async () => {
1717
return response[0][0];
1818
};
1919

20+
export const getAllEntries =async () =>{
21+
const response = await Stack.getEntry({
22+
contentTypeUid:'page'
23+
})
24+
return response[0]
25+
}
26+
2027
export const getHomeRes = async (entryUrl) => {
2128
const response = await Stack.getEntryByUrl({
2229
contentTypeUid: 'page',

0 commit comments

Comments
 (0)