Start loading posts from Wordpress
This commit is contained in:
parent
2430b9f3eb
commit
09ac787260
@ -1,7 +1,5 @@
|
||||
const wordpressPassword = process.env.WORDPRESS_PASSWORD;
|
||||
|
||||
|
||||
|
||||
module.exports = async () => {
|
||||
const response = await fetch("https://lewisdale.dev/wp-json/wp/v2/posts?per_page=100", {
|
||||
headers: {
|
||||
@ -9,9 +7,8 @@ module.exports = async () => {
|
||||
}
|
||||
});
|
||||
|
||||
const responses = await response.json();
|
||||
const posts = await response.json();
|
||||
|
||||
console.log(JSON.stringify(responses[0], null, 2));
|
||||
|
||||
return responses;
|
||||
console.log(posts.map(post => Buffer.from(post.title.rendered).toString("utf-8")));
|
||||
return posts;
|
||||
};
|
@ -1,4 +1,11 @@
|
||||
article img {
|
||||
margin-inline-start: auto;
|
||||
margin-inline-end: auto;
|
||||
article {
|
||||
img {
|
||||
margin-inline-start: auto;
|
||||
margin-inline-end: auto;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
list-style: initial;
|
||||
padding: 0 var(--space-size-m);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user